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