World Assembly
Living in a flat world presents unique challenges, especially when the world itself is a perfectly circular flat planet. Recently, the authorities of such a world decided to organize a World Gathering, inviting all its inhabitants. The goal is to select a location on the planet's surface that minimizes the total distance traveled by all attendees. Your task is to help them find this optimal location. Remember, the planet's surface is a circle centered at the origin, and residents can only move along this circular path.
Input
The input begins with a natural number n (1 ≤ n ≤ 20000), representing the number of inhabitants on the planet. The second line contains n real numbers, each representing the polar angle of a resident's home, given in degrees. These angles are within the interval [0..360] and are separated by spaces. The angles are listed in increasing order and are unique.
The polar angle of a point A is defined as the angle between the x-axis and the line segment OA, where O is the origin. This angle is measured counterclockwise and ranges from [0º..360º].
Output
Your output should be a single line containing one real number within the range [0..360], representing the polar angle of a potential gathering location (in degrees). The total distance traveled by all residents should not deviate from the optimal by more than 10^{-6}. If multiple solutions exist, any one of them is acceptable.
Comments on the example
The example can be visualized in the accompanying figure. Points A_1 and A_2 represent the residents, while point B indicates the chosen location for the World Gathering. Point O is the center of the planet.