params = [int(input()) for i in range(2)] w = params[0] d = params[1] w_rest = w for i in range(d): today = d - i w_today = math.floor(w_rest / (today * today)) w_rest = w_rest - w_today print(w_today)