#include using namespace std; int main() { int64_t N, M; cin >> N >> M; int64_t n = N / M; int64_t a = 0; if (n < 1000) { a = 0; } else { a = n / 1000; a *= 1000; } cout << a << endl; }