#include using namespace std; int main(){ cout << fixed << setprecision(20); int N; cin >> N; double P; cin >> P; if (N >= 200){ cout << 1 << endl; } else { cout << 1 - pow(1 - P, N) << endl; } }