{"problem":{"name":"A. Splits","description":{"content":"Let's define a split of $n$ as a nonincreasing sequence of positive integers, the sum of which is $n$. For example, the following sequences are splits of $8$: $[4, 4]$, $[3, 3, 2]$, $[2, 2, 1, 1, 1, ","description_type":"Markdown"},"platform":"Codeforces","limit":{"time_limit":1000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"CF964A"},"statements":[{"statement_type":"Markdown","content":"Let's define a split of $n$ as a nonincreasing sequence of positive integers, the sum of which is $n$.\n\nFor example, the following sequences are splits of $8$: $[4, 4]$, $[3, 3, 2]$, $[2, 2, 1, 1, 1, 1]$, $[5, 2, 1]$.\n\nThe following sequences aren't splits of $8$: $[1, 7]$, $[5, 4]$, $[11, -3]$, $[1, 1, 4, 1, 1]$.\n\nThe weight of a split is the number of elements in the split that are equal to the first element. For example, the weight of the split $[1, 1, 1, 1, 1]$ is $5$, the weight of the split $[5, 5, 3, 3, 3]$ is $2$ and the weight of the split $[9]$ equals $1$.\n\nFor a given $n$, find out the number of different weights of its splits.\n\n## Input\n\nThe first line contains one integer $n$ ($1 \\leq n \\leq 10^9$).\n\n## Output\n\nOutput one integer — the answer to the problem.\n\n[samples]\n\n## Note\n\nIn the first sample, there are following possible weights of splits of $7$:\n\nWeight 1: \\[$\\textbf 7$\\]\n\nWeight 2: \\[$\\textbf 3$, $\\textbf 3$, 1\\]\n\nWeight 3: \\[$\\textbf 2$, $\\textbf 2$, $\\textbf 2$, 1\\]\n\nWeight 7: \\[$\\textbf 1$, $\\textbf 1$, $\\textbf 1$, $\\textbf 1$, $\\textbf 1$, $\\textbf 1$, $\\textbf 1$\\]","is_translate":false,"language":"English"},{"statement_type":"Markdown","content":"定义 $n$ 的一个划分是一个非递增的正整数序列，其元素之和为 $n$。\n\n例如，以下序列都是 $8$ 的划分：$[ 4, 4 ]$，$[ 3, 3, 2 ]$，$[ 2, 2, 1, 1, 1, 1 ]$，$[ 5, 2, 1 ]$。\n\n以下序列不是 $8$ 的划分：$[ 1, 7 ]$，$[ 5, 4 ]$，$[ 11, -3 ]$，$[ 1, 1, 4, 1, 1 ]$。\n\n一个划分的权重是等于该序列第一个元素的元素个数。例如，划分 $[ 1, 1, 1, 1, 1 ]$ 的权重是 $5$，划分 $[ 5, 5, 3, 3, 3 ]$ 的权重是 $2$，划分 $[ 9 ]$ 的权重是 $1$。\n\n对于给定的 $n$，求其所有划分中不同权重的个数。\n\n第一行包含一个整数 $n$（$1 lt.eq n lt.eq 10^9$）。\n\n输出一个整数——问题的答案。\n\n在第一个样例中，$7$ 的划分可能具有以下权重：\n\n权重 1：[$textbf(7)$] \n\n权重 2：[$textbf(3)$, $textbf(3)$, 1] \n\n权重 3：[$textbf(2)$, $textbf(2)$, $textbf(2)$, 1] \n\n权重 7：[$textbf(1)$, $textbf(1)$, $textbf(1)$, $textbf(1)$, $textbf(1)$, $textbf(1)$, $textbf(1)$]\n\n## Input\n\n第一行包含一个整数 $n$（$1 lt.eq n lt.eq 10^9$）。\n\n## Output\n\n输出一个整数——问题的答案。\n\n[samples]\n\n## Note\n\n在第一个样例中，$7$ 的划分可能具有以下权重：权重 1：[$textbf(7)$] 权重 2：[$textbf(3)$, $textbf(3)$, 1] 权重 3：[$textbf(2)$, $textbf(2)$, $textbf(2)$, 1] 权重 7：[$textbf(1)$, $textbf(1)$, $textbf(1)$, $textbf(1)$, $textbf(1)$, $textbf(1)$, $textbf(1)$]","is_translate":true,"language":"Chinese"},{"statement_type":"Markdown","content":"**Definitions**  \nLet $ n \\in \\mathbb{Z}^+ $. A *split* of $ n $ is a nonincreasing sequence of positive integers $ (a_1, a_2, \\dots, a_k) $ such that $ \\sum_{i=1}^k a_i = n $.  \n\nThe *weight* of a split is defined as the number of times the first element $ a_1 $ appears consecutively at the start of the sequence, i.e.,  \n$$\n\\text{weight} = \\max \\left\\{ j \\in \\mathbb{Z}^+ \\mid a_1 = a_2 = \\cdots = a_j \\right\\}.\n$$\n\n**Objective**  \nFind the number of distinct weights among all possible splits of $ n $.\n\n**Constraints**  \n$ 1 \\le n \\le 10^9 $","is_translate":false,"language":"Formal"}],"meta":{"iden":"CF964A","tags":["math"],"sample_group":[["7","4"],["8","5"],["9","5"]],"created_at":"2026-03-03 11:00:39"}}