a = list(map(int, list(input()))) b = list(map(int, list(input()))) a.reverse() b.reverse() m = max(len(a), len(b)) while len(a) < m: a.append(0) while len(b) < m: b.append(0) a.reverse() b.reverse() ans = 0 for i in range(m): ans |= ((a[i] ^ b[i]) << (m - 1 - i)) print(ans)