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 for i = 1, c - 1 do mul = mul * 2 end print(mul - 1) end