n = int(input()) p = float(input().strip()) if n >= 200: print(1.0) else: probability = 1.0 - (1.0 - p) ** n print("{0:.12f}".format(probability))