#include #define FOR(i,a,b) for(int i = (a); i < (b); ++i) #define REP(i,n) FOR(i,0,n) #define sz(n) (int)(n).size() using namespace std; typedef long long ll; typedef vector VI; int main() { ll n; cin >> n; int m; cin >> m; n /= m * 1000; cout << n * 1000 << endl; return 0; }