H, W = map(int, input().split()) if H == 0 or W == 0: print(0) else: D = abs(W) print(H + D - 1)