from sys import stdin def main(): input = lambda: stdin.readline()[:-1] A, B = map(int, input().split()) ans = (A | B) + (A & B) print(ans) main()