#include using namespace std; int main() { double w,d;cin>>w>>d; for(;d>1;d--)w-=(int)(w/(d*d)); cout<<(w<0?0:w)<