A = int(input(), 2) B = int(input(), 2) print(A | B)