#include using namespace std; using LL = long long; constexpr LL c = 1000000L; int main() { LL W, D; cin >> W >> D; for (LL i = D; i > 1; i--) { W -= (W * c) / (i * i) / c; } cout << W << endl; }