#include main(){ long long N,M; scanf("%lld %lld",&N,&M); N /= 1000LL; printf("%lld",N/M*1000LL); }