A,B = map(int,input().split()) def cake(a,b): if a>b: return b*2 elif a == b: return b*2-1 else: return (a-1)*2+1 if cake(A,B) > cake(B,A) : print(cake(A,B)) else: print(cake(B,A))