a,b=map(int,input().split()) print(min(2*min(a,b),a+b-1))