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