Expression
Time limit2sMemory limit1024 MB
Given n cards with integers, find the smallest index j where a_j equals the sum of all the other cards.
Problem
Ivan had cards, and each card had one integer from -100 to 100 written on it. He often rearranged them, and once he arranged them so that the sum of the first numbers equals the last number, that is, . While Ivan was having lunch, his younger sister Alyona shuffled all the cards. Unfortunately, Ivan did not remember which number was equal to the sum of the others. Help Ivan find it.
Input
The first line contains one integer (), the number of cards. The second line contains integers (), the numbers written on the cards.
Output
Print the smallest index such that is equal to the sum of the numbers on all the other cards.