a, b = [int(x) for x in input().strip().split()] if a == 1 and b == 1 : print(min(a, b) * 2 - 1) else : print(min(a, b) * 2)