A, B = map(int, input().split()) res = (A | B) + (A & B) print(res)