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