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 { int n = Integer.parseInt(stdReader.readLine()); int m = Integer.parseInt(stdReader.readLine()); int num = 0; while((num+1)*m*1000 <= n) num++; System.out.println(num*1000); } catch (IOException e) { e.printStackTrace(); } } }