Score : 200 points
Niwango-kun is an employee of Dwango Co., Ltd.
One day, he is asked to generate a thumbnail from a video a user submitted.
To generate a thumbnail, he needs to select a frame of the video according to the following procedure:
Find the index t of the frame he should select to generate a thumbnail.
Input is given from Standard Input in the following format:
N a_{0} a_{1} ... a_{N-1}
Print the answer.
3 1 2 3
1
Since the average of frame representations is 2, Niwango-kun needs to select the index 1, whose representation is 2, that is, the nearest value to the average.
4 2 5 2 5
0
The average of frame representations is 3.5.
In this case, every frame has the same distance from its representation to the average.
Therefore, Niwango-kun should select index 0, the smallest index among them.