import sys input = lambda: sys.stdin.readline().rstrip() # ----------------------- # n = int(input()) p = float(input()) if n >= 200: print(1.0) else: print(1 - pow(1-p, n))