w,d = int(input()),int(input()) rem = w; day = d while day > 0: p = int(rem / (day * day)) rem -= p day -= 1 print(p)