分数字

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

Background

我们定义正整数nn的分裂为一个由正整数组成的不上升序列,且序列数字和为nn

举个栗子:下列这些序列都是88的分裂:[4,4],[3,3,2],[2,2,1,1,1],[5,2,1][4,4],[3,3,2],[2,2,1,1,1],[5,2,1]

下列这些序列不是88的分裂:[1,7],[5,4],[11,3],[1,1,4,1,1][1,7],[5,4],[11,-3],[1,1,4,1,1]

一个分裂的权是序列第一个数出现的次数,举个例子:[1,1,1,1,1][1,1,1,1,1]的权是55[5,5,3,3,3][5,5,3,3,3]的权是22[9][9]的权是11

现在给出nn,求nn的分裂有多少个不同的权

Description

如上

Format

Input

输入一个n,(1<=n<=109)n, (1 <= n <= 10^9)

Output

nn的分裂有多少个不同的权

Samples

样例 #1

样例输入 #1

7

样例输出 #1

4

样例 #2

样例输入 #2

8

样例输出 #2

5

样例 #3

样例输入 #3

9

样例输出 #3

5

Limitation

1s, 1024KiB for each test case.

样例解释

Weight 1: [ 7 \textbf 7 ]

Weight 2: [ 3 \textbf 3 , 3 \textbf 3 , 1]

Weight 3: [ 2 \textbf 2 , 2 \textbf 2 , 2 \textbf 2 , 1]

Weight 7: [ 1 \textbf 1 , 1 \textbf 1 , 1 \textbf 1 , 1 \textbf 1 , 1 \textbf 1 , 1 \textbf 1 , 1 \textbf 1 ]

大明

Not Attended
Status
Done
Rule
ACM/ICPC
Problem
38
Start at
2025-2-11 16:00
End at
2025-2-28 8:00
Duration
400 hour(s)
Host
Partic.
7