package yukicoder; import java.util.Scanner; public class Yuki51 { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int w = scan.nextInt(); int d = scan.nextInt(); scan.close(); for(int i = d; i>0; i--){ if(i == 1) { System.out.println(w); } w -= w/(i*i); } } }