#include #define rep(i,N) for(ll (i)=0;(i)<(N);(i)++) #define chmax(x,y) x=max(x,y) #define chmin(x,y) x=min(x,y) using namespace std; typedef long long ll; typedef pair P; const int mod = 1000000007; const int INF = 1001001001; int main() { ll w, d; cin >> w >> d; ll ans = 0; ll work = 0; for (int i = d; i >= 1; --i) { work = w / (i * i); w -= work; } cout << work << endl; }