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