import java.util.Scanner; public class sample128 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int a = scan.nextInt(); int b = scan.nextInt(); if(a <= 1000){ System.out.println(a/b); }else if((a/b) >= 1000){ System.out.println((a/b)-((a/b)%1000)); } } }