#Z14121. 计算分数加减表达式的值

计算分数加减表达式的值

Description

Write a program that takes the value of nn and computes the value of the expression: $\frac{1}{1}-\frac{1}{2}+\frac{1}{3} -\frac{1}{4}+\frac{1}{5}-\frac{1}{6}+\frac{1}{7}-\frac{1}{8}+ ... + (-1)^{n-1}·\frac{1}{n}$.

Input Format

Input a positive integer nn. (1n1000)(1 ≤ n ≤ 1000)

Output Format

Output a real number representing the value of the expression, rounded to four decimal places.

2

0.5000