a,b = map(int,input().split()) if a == b == 1: print(1) elif a == b: print(2*a-1) else: print(min(a,b)*2)