#include #define rep(i, ss, ee) for (int i = ss; i < ee; ++i) using namespace std; using ull = unsigned long long; int main() { cin.tie(0); ios::sync_with_stdio(false); ull N,M; cin >> N >> M; ull ans = ((N/M) / 1000) * 1000; cout << ans << endl; getchar(); }