from decimal import Decimal def gacya(n, p): if n >= 200: return 1 else: return 1 - (pow(1-p, n)) if __name__ == '__main__': n = Decimal(input()) p = Decimal(input()) print(gacya(n, p))