#include using namespace std; int main () { int d, w, amount_of_work=0; cin >> w >> d; for(int i=d; i>0; i--) { amount_of_work = w/(i*i); w -= amount_of_work; } cout << amount_of_work << endl; return 0; }