  Let $A\subseteq \mathbb{Z}_{\geq 0}$ be a finite set with minimum element
$0$, maximum element $m$, and $\ell$ elements strictly in between. Write
$(hA)^{(t)}$ for the set of integers that can be written in at least $t$ ways
as a sum of $h$ elements of $A$. We prove that $(hA)^{(t)}$ is "structured" for
  \[ h \geq (1+o(1)) \frac{1}{e} m\ell t^{1/\ell} \]
  (as $\ell \to \infty$, $t^{1/\ell} \to \infty$), and prove a similar theorem
on the size and structure of $A\subseteq \mathbb{Z}^d$ for $h$ sufficiently
large. Moreover, we construct a family of sets $A = A(m,\ell,t)\subseteq
\mathbb{Z}_{\geq 0}$ for which $(hA)^{(t)}$ is not structured for $h\ll m\ell
t^{1/\ell}$.
