#include int main() { int W,D; std::cin >> W; std::cin >> D; while(D > 1) { W-=W/(D*D); D--; } std::cout << W << std::endl; return 0; }