local n = io.read("*n") local p = io.read("*n") local ans = (function () if n >= 200 then return 1 end return 1 - (1 - p) ^ n end)() print(ans)