s = input() t = input() if s > t: s, t = t, s t = (len(s)-len(t))*'0' + t ans = '' for i in range(len(s)): if s[i] == '1': if t[i] == '0': ans += '1' else: ans += '0' else: if t[i] == '0': ans += '0' else: ans += '1' z = 0 for i in range(len(ans)): z *= 2 if ans[i] == '1': z += 1 print(z)