#include <stdio.h>

int main()
{
	int N, M;
	scanf("%d", &N);
	scanf("%d", &M);
	
	printf("%d\n", 1000 * (N / (1000 * M)));

	return 0;
}