import java.util.*; class No0128{ public static void main(String[] args){ Scanner sc = new Scanner(System.in); long n = sc.nextLong(); long m = sc.nextLong(); long result = (n / 1000) / m; if(result > 0){ result *= 1000; } System.out.println(result); } }