x, y = map(int, input().split()) mn = min(x, y) mx = max(x, y) print((mx - mn) * 2 + mn * 2 - 1)