import sys input = sys.stdin.readline from collections import * A, B = map(int, input().split()) print((A|B)+(A&B))