import java.util.*;
import java.lang.*;
import java.io.*;

public class Main {
	public static void main (String[] args) throws java.lang.Exception
	{
		// your code goes here
		// 入力
		Scanner sc = new Scanner(System.in);
		double p = sc.nextDouble();
		
		// 期待値算出
		double exp = 0.0;
		for(int x = 1; x <= 1000; x++){
			exp += Math.pow(p,(double)x) * (1-p) * x;
		}
		
		// 出力
		System.out.println(exp);
	}
}