a,b = [bin(int(x)) for x in input().split(" ")] print(int(a or b, 0) - int(a and b, 0))