#include using namespace std; using ll = long long; using llu = long long unsigned; vector dx = { 0, 0, -1, 1}; vector dy = {-1, 1, 0, 0}; #define MOD 1000000007 int main() { int A, B; cin >> A >> B; int ret; if (A==B) { ret = A*2-1; } else { ret = min(A, B)*2; } cout << ret << endl; return 0; }