import sys stdin = sys.stdin sys.setrecursionlimit(10**6) ni = lambda: int(ns()) na = lambda: list(map(int, stdin.readline().split())) nn = lambda: list(stdin.readline().split()) ns = lambda: stdin.readline().rstrip() p = float(input()) pp = 1 ans = 0 for i in range(1,10000): pp *= p ans += i*(1-pp) print(ans)