Problems
Stepan and pairs
Stepan and pairs
Stepan is interested in the greatest common divisor of a pair of numbers, specifically $GCD(x, y)$. Given an integer $n$, Stepan wants to know how many pairs of integers $(i, j)$ exist such that $1 \le i, j \le n$ and the equation $i = GCD(i, j)$ is satisfied.
\InputFile
One integer $n\:(1 \le n ≤ 10^6)$.
\OutputFile
Print the number of required pairs.
Input example #1
1
Output example #1
1
Input example #2
4
Output example #2
8
Input example #3
10
Output example #3
27
Example description: In the first example a suitable pair is (1, 1), because GCD(1, 1) = 1. In the second example, 8 pairs of numbers are suitable: (1, 1), (1, 2), (1, 3), (1, 4), (2, 2), (2, 4), (3, 3), (4, 4).