Let A={0=a0<a1<⋯<aℓ+1=b} be a finite set of non-negative integers. We prove that the sumset NA has a certain easily-described structure, provided that N⩾b−ℓ, as recently conjectured by Shakan and the first author. We also classify those sets A for which this bound cannot be improved.