#include <iostream>
#include <algorithm>
#include <vector>
#include <math.h>
#include <numeric>
#include <queue>
#include <map>
#include <math.h>
#include <stack>
#include <math.h>
using namespace std;
typedef long long int ll;


using ull = unsigned long long;
int bsf(ull x) { return __builtin_ctzll(x); }
struct fastset{
    int N,lg;
    vector<vector<ull>> seg;
    fastset(int N):N(N){
        while(N>1){
            seg.push_back(vector<ull>((N+63)/64));
            N=(N+63)/64;
        }
        lg=seg.size();
    }
    void ins(int x){
        for(int i=0;i<lg;i++){
            int D=x/64,R=x%64;
            seg[i][D]|=(1ULL<<R);
            x/=64;
        }
    }
    void cle(int x){
        for(int i=0;i<lg;i++){
            int D=x/64,R=x%64;
            seg[i][D] &= ~(!1ULL<<R);
            if(i&&seg[i-1][x]!=0){
                seg[i][D]|=(1ULL<<R);
            }
            x/=64;
        }
    }
    // x以上の最小の要素
    int upp(int x){
        for(int i=0;i<lg;i++){
            int D=x/64,R=x%64;
            if(D==seg[i].size())break;
            ull B=seg[i][D]>>R;
            if(!B){
                x=x/64+1;
                continue;
            }
            // find
            x+=bsf(B);
            for(int j=i-1;j>=0;j--){
                x*=64;
                int D=x/64;
                x+=bsf(seg[j][D]);
            }
            return x;
        }
        return N;
    }
};

int main(){
    cin.tie(nullptr);
    ios::sync_with_stdio(false);
    int a,b; cin >> a >> b;
    int dif=abs(a-b);
    cout << a+b-max(dif-1,0)-1 << endl;
}