Helly’s theorem and minima of convex functions