#define _USE_MATH_DEFINES #include #include #include #include #include #include #include #include #include #include #include #include #include #define roop(i, n) for(int i=0;i 0) { // 全てのbitが捨てられるまで if ( n & 1) { // 一番右のbitが1のとき x *= a; } a *= a; n >>= 1; // bit全体を右に1つシフトして一番右を捨てる } return x; } ll combination(ll n, ll r) { if (n < 0 || r < 0 || r > n) return -1; if (n - r < r) r = n - r; if (r == 0) return 1; if (r == 1) return n; vector num(r); vector den(r); for (ll i = 0; i < r; i++) { num[i] = n - r + i + 1; den[i] = i + 1; } for (ll p = 2; p <= r; p++) { ll pivot = den[p - 1]; if (pivot > 1) { ll offset = (n - r) % p; for (ll k = p - 1; k < r; k += p) { num[k - offset] /= pivot; den[k] /= pivot; } } } ll result = 1; for (ll k = 0; k < r; k++) { if (num[k] > 1) result *= num[k]; } return result; } vector split(const string& src, const char* delim = ",") { vector vec; string::size_type len = src.length(); for (string::size_type i = 0, n; i < len; i = n + 1) { n = src.find_first_of(delim, i); if (n == string::npos) { n = len; } vec.push_back(src.substr(i, n - i)); } return vec; } bool check_int(string str) { if (all_of(str.cbegin(), str.cend(), [](char ch) { return isdigit(ch);})) { return true; } return false; } int main() { int a, b; cin >> a >> b; if (a == b) { cout << 2 * a - 1 << endl; } else { if (a < b) { cout << a * 2 << endl; } else { cout << b * 2 << endl; } } return 0; }