import sys def input(): return sys.stdin.readline().rstrip() from collections import deque def main(): a = int(input()) p = 0 A = 0 while a: A += a%10*2**p a //= 10 p += 1 b = int(input()) p = 0 B = 0 while b: B += b%10*2**p b //= 10 p += 1 print(A^B) if __name__ == "__main__": main()