x,y=map(int,input().split()) ans=0 if x==y: print(x+y) exit() ans+=min(x,y)*2 z=max(x,y)-min(x,y) ans+=2*z-1 print(ans)