#include #include using namespace std; int main(){ unsigned long long int n,m,ans; cin >> n >> m; if (n >= 10000){ ans = n/m; //予算÷人数 ans = (ans/1000)*1000; //1000円以下切捨て cout << ans << endl; }else if (n < 1000){ //1000円以下の場合配布不可 cout << "0" << endl; }else{ ans = n/m; ans = (ans/1000)*1000; cout << ans << endl; } return 0; }