AtCoder Beginner Contest 179
C
A x B + C
AtCoder
⌀ 261
原题
← BD →
翻译中…

Problem Statement

翻译中…

Given is a positive integer $N$. How many tuples $(A,B,C)$ of positive integers satisfy $A \times B + C = N$?

翻译中…

Constraints

翻译中…
  • $2 \leq N \leq 10^6$
  • All values in input are integers.
翻译中…

Input

翻译中…

Input is given from Standard Input in the following format:

翻译中…

N

翻译中…

Output

翻译中…

Print the answer.

翻译中…

样例

Input #1
3
Output #1
3
There are $3$ tuples of integers that satisfy $A \times B + C = 3$: $(A, B, C) = (1, 1, 2), (1, 2, 1), (2, 1, 1)$.
Input #2
100
Output #2
473
Input #3
1000000
Output #3
13969985
题目信息
题号
abc179_c
时间限制
2 s
内存限制
1024 MB

题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。