#include void main(void){ long long int total = 0; int input = scanf("%d\n",&total); int children = 0; input = scanf("%d\n",&children); long long int gift = total/1000/children; printf("%d",gift*1000); }