#include using namespace std; int main(int argc, const char* argv[]) { uint64_t N, M; cin >> N >> M; cout << N / M / 1000 * 1000 << endl; return 0; }