#include #include #include #define N_MAX 1000000 using namespace std; int main() { int N; double p, ans; cin >> N >> p; ans = N - 1; for (int i = 2; i <= N; ++i) { ans -= p*(N - i) / i; } //ans += N; cout << ans; return 0; }