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