#include <bits/stdc++.h>
#define rep(i,n) for (int (i) = 0; (i) < (n); i++)
#define ll long long
using namespace std;

int main() {
  int n,m;
  cin >> n >> m;
  if(n == m){
    cout << 2*m;
  }
  else{
    cout << 2*max(m,n)-1;
  }
}
#include <iostream>
using namespace std;

int main()
{
  int a, b, ans = 0;
  cin >> a >> b;
  ans += max(a , b);
  if(a == b) ans += max(a, b);
  else ans += ans - 1;
  
  cout << ans << endl;
  return 0;
}