w = gets.to_f d = gets.to_i while d > 0 do if d == 1 puts (w/d**2).floor break end w -= (w/d**2).floor d -= 1 end