P = float(input()) if P == 0: print(0) else: print(1 / ( 1 - P ) + 1)