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