SP21174 TAP2014G - Gallantry
Description
**\[ The original version of this problem (in Spanish) can be found at** **[http://dc.uba.ar/events/icpc/download/problems/tap2014-problems.pdf](http://dc.uba.ar/events/icpc/download/problems/tap2014-problems.pdf "http://dc.uba.ar/events/icpc/download/problems/tap2014-problems.pdf")** **\]**
Every weekend, Germán and Gianina play a football match with their friends. This Saturday, both German and Gianina are injured, so they will participate in the game as coaches.
Input Format
The first line contains an integer **N** representing the number of players to choose from (with **2 ****1000** and **N** even). The second line contains **N** integers **P $ _{1} $ , P $ _{2} $ , ..., P $ _{N} $** representing the scores of each player (**1** ****P $ _{i} $** ****1000** for **i = 1, 2, ..., N**).********
Output Format
Print a line containing a single integer that represents how many times Germán can yield his turn in such a way that his team's victory is guaranteed. If Germán can not ensure a victory, you must print the number **-1**.