public class No_128 { public static void main(String[] args) { java.util.Scanner sc = new java.util.Scanner(System.in); long otoshidama = sc.nextLong(); long paperMoney = otoshidama / 1000; long child = sc.nextLong(); System.out.println(paperMoney / child); sc.close(); } }