#include <bits/stdc++.h>
using namespace std;

int main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  int N;
  double P;
  cin>>N>>P;
  cout<<setprecision(10)<<(N>=200?1:1-pow(1-P,N))<<'\n';
}