#include #include #include #include #include #define REP(i,n) for(int i=0;i<(n);++i) #define SORT(a) sort((a).begin(),(a).end()) #define PB push_back using namespace std; typedef vector VI; typedef queue QI; int main(){ int N, M; cin >> N >> M; cout << N / (M*1000) * 1000 << endl; }