import java.util.*; public class Run { public static void main (String arg[]) { Scanner scan = new Scanner(System.in); long N = scan.nextLong(); long M = scan.nextInt(); long ans = (N / (M * 1000)); ans *= 1000; System.out.println(ans); } }