#include int main(void){ int w,d; std::cin>>w>>d; while(d>1) w-=w/(d*d),d--; std::cout<