l=input().split() print(2*int(min(l))-(l[0]==l[1]))