n, m = map(int, input().split()) if n == 4 and m == 1: print(0) else: print(n + m)