#include #include #include #define pai 3.1415926535 int main(void) { int N, M; scanf("%d%d", &N, &M); printf("%d\n", ((N / M)/1000)*1000); return 0; }