#include using namespace std; int main() { int a,b; cin >> a >> b; if(a>=b){ cout << b+min(a-1,b); }else{ cout << a+min(b-1,a); } cout << endl; return 0; }