#include #define LL long long int main(void) { LL n; scanf("%lld", &n); int m; scanf("%d", &m); printf("%lld\n", ((n / 1000) / m) * 1000); return 0; }