#P222. 【例37.2】 求分数序列和
【例37.2】 求分数序列和
Description
There is a sequence of fractions , , , , , ..., where , , , and . For example, the first 5 terms of this sequence are , , , , . Calculate the sum of the first n terms of this sequence.
Input Format
Input consists of a single line containing a positive integer n (n≤30).
Output Format
Output consists of a single line containing a floating-point number representing the sum of the first n terms of the sequence, rounded to 4 decimal places.
Sample
23.5000