#include using namespace std; int main() { ios::sync_with_stdio(false); cin.tie(0); int64_t N, M; cin >> N >> M; cout << N / (1000 * M) * 1000 << '\n'; return 0; }