Circum Triangle#1503

Circum Triangle

1 second
128 megabytes
Easy

You are given distinct points located on a circle of radius centered at the origin. Since all points lie on the same circle, no three of them are collinear; therefore, any three points form a valid triangle. Your task is to compute the sum of the areas of all such triangles.

Input

Contains at most test cases. Each test case begins with two integers n~(0 \le n \le 500) and r~(0 < r \le 100), where is the number of points and is the radius of the circle. The center of the circle is always at the origin.

The following lines each contain a real number (0.0 \le \theta < 360.00) — the angle in degrees between the corresponding point and the -axis. For example, if \theta = 30.00, then the coordinates of the point are

(r \cdot \cos(30.00^\circ),\ r \cdot \sin(30.00^\circ))

The last line contains n = 0 and r = 0 and should not be processed.

Output

For each test case, print one line — the sum of the areas of all possible triangles formed by the given points, rounded to the nearest integer.

Examples

Example 1

Loading
Loading