#include using namespace std; int main(){ int64_t n,m; cin>>n>>m; cout<<(n/m)/1000*1000<<"\n"s; }