#include #include #include using namespace std; using ll = long long; using mint = atcoder::modint998244353; using maxt = atcoder::modint1000000007; double my_pow(int n, double p) { if(n == 1) { return p; } double ans = my_pow(n / 2, p) * my_pow(n / 2, p); if(n % 2 == 1) { ans *= p; } return ans; } int main() { int N; double P; cin >> N >> P; if(N < 200) { cout << fixed << setprecision(6); cout << 1 - my_pow(N, 1 - P) << endl; } else { cout << 1 << endl; } }