a = input() b = input() for c in a + b: assert c in "01" assert a[0] == "1" assert b[0] == "1" assert len(a) <= 64 assert len(b) <= 64