#include <iostream> #include <cmath> using namespace std; int main(){ int n,m; cin>>n>>m; if(n==m){ cout<<n+m; } else cout<<2*min(m,n)+1; return 0; }