def METHOD_NAME(elems):
  """Get the number of rings for a specified number of elements."""
  remaining = elems
  i = 0
  while (remaining > 0):
    i += 1
    remaining -= elements_in_ring(i)
  if (elems != elements(i)):
    raise ValueError("Number of elements not evenly divisible in a hexagonal lattice")
  return i