W = int(input()) D = int(input()) def workLoad(w, rd): wl = w // rd ** 2 if rd == 1: return wl else: return workLoad(w - wl, rd - 1) print(workLoad(W, D))