Wandering

아직 제출이 없습니다시간 제한1초메모리 제한256 MB

문제

Rikka is a talented student.

She likes to wander in the corridor while solving ICPC problems. Specifically, she will do a random walk for nn steps. In the ii-th random step, she will choose one of the vectors (x,y)(x, y) such that x,yRx, y \in \mathbb{R} and x2+y2R_i2x^2 + y^2 \le R\_i^2 with equal probability. And then she will walk along the vector. In other words, if she stood at (A,B)(A, B) before the random step, she will stand at (A+x,B+y)(A + x, B + y) afterwards. Before wandering, she stands at the door (0,0)(0, 0).

After wandering, she was curious about the expectation of the square of Euclidean distance to point (0,0)(0, 0). In other words, she wants to know the expected value of x2+y2x^2 + y^2, if she stands at (x,y)(x, y) after all nn random steps.

입력

The first line contains an integer nn, the number of random steps.

The second line contains nn positive integers R_iR\_i, the parameter of the ii-th random step.

It is guaranteed that 1n50,0001 \le n \le 50\\,000 and 1R_i10001 \le R\_i \le 1000.

출력

You need to output dd, the expected value of x2+y2x^2 + y^2. Assuming the correct result is d\*d^\*, you need to ensure that dd\*maxd\*,1106\frac{|d - d^\*|}{\max\\{d^\*, 1\\}} \leq 10^{-6}.