#include using namespace std; typedef int64_t lint; int main() { lint w, d; cin >> w >> d; lint s; for (int i = 1; i < d; i++) { w -= w / ((d - i + 1) * (d - i + 1)); } cout << w << endl; // system("pause"); }