import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main { public static void main(String[] args) { BufferedReader stdReader =new BufferedReader(new InputStreamReader(System.in)); try { long n = Long.parseLong(stdReader.readLine()); int m = Integer.parseInt(stdReader.readLine()); System.out.println(n/(m*1000)*1000); } catch (IOException e) { e.printStackTrace(); } } }