#include <bits/stdc++.h>

#define EPS (1e-9)

using namespace std;

int main() {
	double p;
	cin >> p;

	double ans = 0;
	double i = 1, q = p;
	while(i*q > EPS) {
		ans += i*q;
		i += 1;
		q *= p;
	}
	ans *= (1-p);

	cout << fixed << setprecision(20) << ans << endl;

	return 0;
}