#include #define rep(i, n) for (int i = 0; i < (n); ++i) using std::cin; using std::cout; int main() { int n; double p; cin >> n >> p; if (n >= 200) { puts("1"); return 0; } double ans = 1 - pow(1-p, n); printf("%.10lf\n", ans); return 0; }