Harmonic numbers (1)

Write a program that reads a number n and prints the n-th harmonic
number, defined as H_(n) = 1/1 + 1/2 + ⋯ + 1/n.

Input

Input consists of a natural number n.

Output

Print H_(n) with 4 digits after the decimal point.

Problem information

Author: Unknown
Translator: Salvador Roura

Generation: 2026-01-25T11:34:14.804Z

© Jutge.org, 2006–2026.
https://jutge.org
