Given a measurable set A⊂Rn of positive measure, it is not difficult to show that ∣A+A∣=∣2A∣ if and only if A is equal to its convex hull minus a set of measure zero. We investigate the stability of this statement: If (∣A+A∣−∣2A∣)/∣A∣ is small, is A close to its convex hull? Our main result is an explicit control, in arbitrary dimension, on the measure of the difference between A and its convex hull in terms of (∣A+A∣−∣2A∣)/∣A∣.