import sys input = sys.stdin.readline n = int(input()) p = float(input()) if(n >= 200): exit(print(1)) ans = 1 - (1 - p) ** n print(ans)