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