package m.shin; import java.util.Scanner; public class Con128 { public static void main(String[] args) { Scanner s = new Scanner(System.in); long N = s.nextLong(); int M = s.nextInt(); s.close(); long max = (N / (M * 1000)); System.out.println(max * 1000); } }