a = io.read():reverse() b = io.read():reverse() if #a < #b then a = a .. string.rep("0", #b - #a) elseif #b < #a then b = b .. string.rep("0", #a - #b) end mul = 1 ans = 0 for i = 1, #a do if a:byte(i) ~= b:byte(i) then ans = ans + mul end mul = mul * 2 end print(ans)