#include #include #include #include int main(void){ long long int n,m; scanf("%lld",&n); scanf("%lld",&m); if(n<=999){printf("0\n");} else if((n%m==(long long int)0)){printf("%.0lld",(long long int)n/m);} else{printf("%.0lld\n",(long long int)n/m-n%m);} }