#include #include using namespace std; int n; double p, q, r; int main() { cin >> n >> p; if (n < 200) { r = p; q = p; for (int i = 1; i < n; i++) { r *= 1 - p; q += r; } cout << setprecision(10) << q << endl; } else cout << 1 << endl; }