from sys import stdin readline = stdin.readline n = int(readline()) p = float(readline()) w = 0.0 q = 0.0 s = 0.0 if n >= 200: s = 1 else: for i in range(n): q = (1 - q) * p s += q print(s)