#include<bits/stdc++.h> using namespace std; int main(){ int w,d,ans; cin>>w>>d; for(int i=0;i<d;++i){ ans=w/pow(d-i,2); w-=ans; } cout<<ans<<endl; }