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