//No.51 やる気の問題 import java.util.*; import java.io.*; import static java.util.Arrays.*; import static java.lang.Math.*; public class No51 { static final Scanner sc = new Scanner(System.in); static final PrintWriter out = new PrintWriter(System.out,false); static void solve() { int w = sc.nextInt(); int d = sc.nextInt(); int ans = 0; for (int i=d; i>0; i--) { int t = w/(i*i); ans = t; w -= t; } out.println(ans); } public static void main(String[] args) { long start = System.currentTimeMillis(); solve(); out.flush(); long end = System.currentTimeMillis(); //trace(end-start + "ms"); sc.close(); } static void trace(Object... o) { System.out.println(deepToString(o));} }