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