#include int main(){ long long int n, m; scanf("%lld%lld", &n,&m); printf("%lld\n",n/(m*1000)*1000); return 0; }