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