import java.io.BufferedReader; import java.io.InputStreamReader; public class No128 { public static void main(String args[]){ try{ BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); long budget = Long.parseLong(br.readLine()); int member = Integer.parseInt(br.readLine()); System.out.println((budget / (member*1000)) * 1000); }catch(Exception e){ e.getStackTrace(); } } }