A,B=(int(x) for x in input().split()) if A>B: z=B*2 elif A==B: z=B*2-1 else: z=A*2 print(z)