#include int main(void){ //予算がN ,親戚の子供M long long int N,M; long long int otoshidama; scanf("%lld%lld",&N,&M); otoshidama=N/M; if(otoshidama>=1000){ otoshidama/=1000; otoshidama*=1000; printf("%lld",otoshidama); } else printf("0"); return 0; }