Given a set of line segments, determine the minimum number of segments that must be removed so that the remaining segments can form a polygon with non-zero area.
The first line contains an integer (3 \leq n \leq 50), the number of segments in the set. The second line contains integers: the lengths of the segments. Each length is between and 10^6 inclusive.
Output the minimum number of segments that need to be removed so that the remaining segments can form a polygon. If it is not possible to form a polygon from any subset of the segments, output -1.
Example 1