
You are given an array of positive integers nums of length n .
A polygon is a closed plane figure that has at least 3 sides. The longest side of a polygon is smaller than the sum of its other sides.
Conversely, if you have k ( k >= 3 ) positive real numbers a _1 , a _2 , a _3 , ..., a _k where a _1 <= a _2 <= a _3 <= ... <= a _k and a _1 + a _2 + a _3 + ... + a _k-1 > a _k , then there always exists a polygon with k sides whose lengths are a _1 , a _2 , a _3 , ..., a _k .
The perimeter of a polygon is the sum of lengths of its sides.
Return the largest possible perimeter of a polygon whose sides can be formed from nums , or -1 if it is not possible to create a polygon .
3 <= n <= 10 ^51 <= nums[i] <= 10 ^9