Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/garmonik-qator-yigindisi

Harmonic series sum

Easy 1000 ms 64 MB 25%
Share

A positive integer $N$ is given. Compute the sum of the harmonic series:

$$S = 1 + \frac{1}{2} + \frac{1}{3} + \dots + \frac{1}{N}$$

The sum of the terms of the harmonic series

Input

One positive integer $N$.

Output

One number — $S$, with exactly 2 digits after the decimal point (for example, 1.00).

Note

$1 \le N \le 10^{4}$

Examples

Input #1
1
Output #1
1.00
Input #2
2
Output #2
1.50

Sign in to submit a solution

Signing up is free and takes a minute.