A = input() B = input() A = "0"*(30-len(A))+A B = "0"*(30-len(B))+B ans = 0 for a,b in zip(A,B): ans <<= 1 if a != b: ans += 1 print(ans)