#include using namespace std; int main(){ int n; cin >> n; double p; cin >> p; if(n >= 200){ cout << 1 << endl; return 0; } double q = 1.0; for(int i = 0; i < n; ++i){ q *= 1 - p; } double ans = 1 - q; cout << setprecision(16) << ans << endl; return 0; }