p = float(input()) a = 0.0 for i in range(300): a += p**i * (1-p) * i print(a)