## Mock CCC '22 Contest 2 J3 - Figure Skating Fun

View as PDF

Points: 5 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

Andrew has just finished judging the figure skating event! There were competitors, and the one received a score of .

Since Andrew likes symmetry, he wants to find the spot to split the scores such that the sum of the scores on the left equals the sum of the scores on the right. Splitting between competitor and competitor is defined as spot . Help Andrew find this spot!

#### Input Specification

The first line contains one integer , the number of competitors.

The second line contains space-separated integers , the score of the competitor.

#### Output Specification

Output on a single line the spot , or Andrew is sad. if it doesn't exist.

#### Sample Input 1

3
1 1 2

#### Sample Output 1

2

#### Explanation for Sample 1

Splitting between competitors and , which is spot , yields the desired result: left of the spot sums to , while the right of the spot sums to .

#### Sample Input 2

3
1 1 1

#### Sample Output 2

Andrew is sad.