eolymp
bolt
Try our new interface for solving problems
Problems

A * B + C

A * B + C

Positive integer $n$ is given. How many tuples $(A, B, C)$ of positive integers satisfy $A \cdot B + C = n$? \InputFile One positive integer $n~(2 \le n \le 10^8)$. \OutputFile Print the required number of tuples. \Note For $n = 3$ there are exactly three triplets: \begin{itemize} \item $(1, 1, 2)$, since $1 \cdot 1 + 2 = 3$; \item $(1, 2, 1)$, since $1 \cdot 2 + 1 = 3$; \item $(2, 1, 1)$, since $2 \cdot 1 + 1 = 3$. \end{itemize}
Time limit 2 seconds
Memory limit 128 MiB
Input example #1
3
Output example #1
3
Input example #2
11
Output example #2
27