#include<iostream> #include<string> #include<algorithm> #include<cmath> #include<iomanip> #include<cstring> #include<map> #include<vector> #include<queue> #include<utility> using namespace std; typedef long long int ll; int main(){ ll w, d, tmp; cin >> w >> d; ll n=d; for(int i=0; i<n; i++){ tmp=w; w=w/(d*d); d--; if(i<n-1){ w=tmp-w; } } cout << w << endl; return 0; }