#include #include #include #include using namespace std; int main(){ long long int n; int m; cin>> n>> m; int ans = n/m; ans = ans/1000*1000; cout<< ans<< endl; return 0; }