#include #include using namespace std; #define LL long long int main(){ LL w,d; cin>>w>>d; while(d>1){ w-=(w/((d)*(d))); d--; } cout<