#include using namespace std; int main(){ int n,m; cin >> n >> m; cout << div(div(n, m).quot,1000).quot*1000; }