def gacya(n, p): return 1 - (pow(1-p, n)) if __name__ == '__main__': n = int(input()) p = float(input()) print(gacya(n, p))