#P221. 【例37.1】 分数加减表达式的值

【例37.1】 分数加减表达式的值

Description

Write a program that takes a value n as input and calculates 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 n (1≤n≤1000).

Output Format

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

Sample

2
0.5000