A = int(input()) B = int(input()) C = list(str(A + B)) D = "" for i in range(len(C)): if C[i] == "2": C[i] = "0" D += C[i] print(int(D, 2))