#include main(){ int W,D; scanf("%d%d",&W,&D); int rest = W; for(int i = 0;i < D-1;i++){ rest -= rest / ((D-i)*(D-i)); } printf("%d",rest); }