a,b = map(int,input().split()) if a < b: print((b-a)*2-1 + (a*2)) elif b < a: print((a-b)*2-1 + (b*2)) else: print(a+b)