import sys input=lambda:sys.stdin.readline().rstrip() N,M=map(int,input().split()) print(N+M+max(abs(N-M)-1,0))