#include using namespace std; int main() { int a, b; cin >> a >> b; int c = a / b / 1000; cout << c*1000 << endl; }