#include using namespace std; using ll=long long; using Graph=vector>>; #define INF 1000000000000000000 #define MOD 1000000007 int main(){ int A,B; cin>>A>>B; if(A==B){ cout<<2*A-1<