import sys input = lambda: sys.stdin.readline().rstrip() # ----------------------- # a, b = map(int, input().split()) print(2*min(a,b) + (2*(max(a,b)-min(a,b))-1 if a != b else 0))