import java.util.Scanner; class No_128 { public static void main(String args[]) { Scanner stdIn = new Scanner(System.in); long budget = stdIn.nextLong(); long persons = stdIn.nextLong(); long count = 0; while ( true ) { if ( count * (persons * 1000) == budget ) { break; } if ( count * (persons * 1000) > budget ) { count--; break; } count++; } System.out.println(1000 * count); } }