N = int(input()) P = float(input()) ans = 1 if N < 200: ans = 1 - (1 - P) ** N print("{:.12f}".format(ans))