Welcome to ZOJ
Information
Problems
Runs
Statistics
Ranklist
Clarification
115 - The 12th Zhejiang University Programming Contest - E
Two Sequences

Time Limit: 2 Seconds      Memory Limit: 65536 KB      Special Judge

We have a real value x and two infinite sequences A and B. We know that B0 = 1. And for each i larger than zero, we know that:

For every given A0, define:

Now given A0 and list of xi which has n elements, calculate the geometric mean of all F(x), thus:

Input

The input contains several test cases.

For each test case, the first line contains a real value A0(0 < A0 < 10000) and an integer n(0 < n < 10000), then the second line contains n real values xi(0 ≤ xi ≤ 30).

Output

For each test case, output a real number as the description required. The relative or absolute error of the answer should not exceed 1e-6.

Sample Input

55.55 1
0.0
12.34 1
1.0

Sample Output

55.55
55.304043

Author: FAN, Yuzhe
Submit    Status