import java.io.IOException; import java.util.Scanner; public class Main { public static void main(String[] args) throws NumberFormatException, IOException{ Scanner sc = new Scanner(System.in); long numA = sc.nextLong(); long numB = sc.nextLong(); long numC = (numA/(numB*1000))*1000; System.out.println(numC); } }