#include<bits/stdc++.h> using namespace std; using ll = long long; #define fi first #define se second #define all(a) a.begin(),a.end() int main(){ int n; long double p; cin >> n >> p; if(n>=200) cout << 1 << endl; else{ long double ans=1; for(int i=0; i<n; ++i) ans*=(1-p); ans=1-ans; cout << fixed << setprecision(10) << ans << endl; } return 0; }