from random import random p = float(input()) c = 0 for i in range(100000): while random() <= p: c += 1 print(c / 100000)