#include int main(){ unsigned long long have,apply; std::cin >> have >> apply; std::cout << have/apply/1000*1000 << std::endl; return 0; }