World Assembly#4876

World Assembly

1 second
64 megabytes
Hard

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 (1 \leq n \leq 20000), representing the number of inhabitants on the planet. The second line contains real numbers, each representing the polar angle of a resident's home, given in degrees. These angles are within the interval and are separated by spaces. The angles are listed in increasing order and are unique.

The polar angle of a point is defined as the angle between the -axis and the line segment , where is the origin. This angle is measured counterclockwise and ranges from [0^\circ..360^\circ].

Output

Your output should be a single line containing one real number within the range , 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.

Examples

Example 1

Loading
Loading

Note

The example can be visualized in the accompanying figure. Points A_1 and A_2 represent the residents, while point indicates the chosen location for the World Gathering. Point is the center of the planet.