import java.util.*; public class Main { public static void main(String[] args) { int o,p,q; int a = 0, b = 0,c=0; Scanner sc = new Scanner(System.in); // int[] test = new int[100000]; // String str1 = sc.next(); int s = Integer.parseInt(sc.next()); int t = Integer.parseInt(sc.next()); a = s / ( t * 1000 ) * 1000; System.out.println(a); System.out.println(); } }