import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A, B = map(int, readline().split()) if A < B: A, B = B, A A = min(A, B + 1) print(A + B - 1)