import java.util.Scanner; public class Main { public static void main(String[] args) throws Exception { Scanner sc = new Scanner(System.in); double p = sc.nextDouble(); sc.close(); double[] dp = new double[1000000]; dp[0] = 1; for (int i = 1; i < dp.length; i++) { dp[i] = dp[i - 1] * p; } double ans = 0; double sum = 1; for (int i = 1; i < dp.length; i++) { ans += i * dp[i]; sum += dp[i]; } System.out.println(ans / sum); } }