Problems
Sum of values
Sum of values
Find the sum of values for the function
in some integers.
Input
First line contains the number of points n (1 ≤ n ≤ 50). Next line contains n integers x1
, x2
, ..., xn
- the points where the function must be calculated and summed up (0 ≤ |xi
| ≤ 109
).
Output
Print one number - the sum of function values f(x) at given points. The answer is correct if its accuracy is no less than 10-9
.
Input example #1
3 1 2 3
Output example #1
7.833333333333333
Input example #2
2 1 -1
Output example #2
0