a,b = map(int,input().split()) if a==0 and b==0: print(0) else: ans = (a+b - abs(a-b)) + (2*abs(a-b)-1) print(ans)