import java.util.Scanner; public class pre { public static void main(String[] args) { Scanner s = new Scanner(System.in); long w = s.nextInt(),d = s.nextInt(),lastw=0; while(d>0){ lastw = w / (d*d); w -= lastw; d--; } System.out.println(lastw); } }