import java.io.BufferedReader; import java.io.InputStreamReader; public class Main { public static void main(String args[]) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); String line = br.readLine(); long money = Long.parseLong(line); line = br.readLine(); int children = Integer.parseInt(line); System.out.println(money / children / 1000 * 1000); } }