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