import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Tester2 { public static void main(String[] args){ try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))){ long num = Long.parseLong(br.readLine()); long m = Long.parseLong(br.readLine()); System.out.println(method(num,m)); }catch(IOException e) { e.printStackTrace(); } } static int method(long num,long m) { int n = (int)(num/(m*1000)); if(n != 0)return n*1000; return 0; } }