from decimal import Decimal n=int(input()) p=float(input()) pp=1 p = 1-p if n >= 200: print(1) exit() for i in range(n): pp *= Decimal(p) print(round(1-pp,8))