local a, b = io.read("*n", "*n") if b < a then a, b = b, a end local c, d = 0, 0 z = a while 0 < z do c = c + 1 z = math.floor(z / 2) end z = b while 0 < z do d = d + 1 z = math.floor(z / 2) end if c < d then print(a) else local mul = 1 while true do if a < mul * 2 - 1 then break end mul = mul * 2 end print(mul - 1) end