import java.util.*; class Yuki128{ public static void main(String[] args){ Scanner stdIn = new Scanner(System.in); long n = stdIn.nextLong(); long m = stdIn.nextLong(); double a = n/m; long answer = (long)a/1000; System.out.println(answer*1000); } }