#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using P = pair<ll,ll>;
#define rep(i, n) for(int i = 0; i < n; i++)
#define all(x) (x).begin(),(x).end()
template<class T>bool chmin(T&a, const T&b){if(a>b){a=b;return 1;}return 0;}
template<class T>bool chmax(T&a, const T&b){if(a<b){a=b;return 1;}return 0;}

int main(){
    int n;
    double p,ans = 1;
    cin >> n >> p;
    if(n<200){
        rep(i,n) ans *= (1-p);
    }else ans = 0;
    printf("%.12lf\n",1-ans);
    return 0;
}