import sys input = sys.stdin.readline A,B=map(int,input().split()) if A==B: print(A+B) else: if A>B: A,B=B,A ANS=A+(A+1) ANS+=(B-(A+1))*2 print(ANS)