N = int(input()) P = float(input()) if N >= 200: print(1) exit() q = (1 - P) ans = 1 - q ** N print(ans)