import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader; public class Main{ public static void main(String[] args) { try (BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) { long w = Integer.parseInt(br.readLine()); int d = Integer.parseInt(br.readLine()); int moto = 0; while (d > 0) { moto = (int)w / d / d; w -= moto; d--; } System.out.println(moto); } catch (IOException e) { e.printStackTrace(); } } }