{"raw_statement":[{"iden":"statement","content":"You are given an integer _N_. Consider all possible segments on the coordinate axis with endpoints at integer points with coordinates between 0 and _N_, inclusive; there will be of them.\n\nYou want to draw these segments in several layers so that in each layer the segments don't overlap (they might touch at the endpoints though). You **can not** move the segments to a different location on the coordinate axis.\n\nFind the minimal number of layers you have to use for the given _N_."},{"iden":"input","content":"The only input line contains a single integer _N_ (1 ≤ _N_ ≤ 100)."},{"iden":"output","content":"Output a single integer - the minimal number of layers required to draw the segments for the given _N_."},{"iden":"examples","content":"Input\n\n2\n\nOutput\n\n2\n\nInput\n\n3\n\nOutput\n\n4\n\nInput\n\n4\n\nOutput\n\n6"},{"iden":"note","content":"As an example, here are the segments and their optimal arrangement into layers for _N_ = 4.\n\n<center>![image](https://espresso.codeforces.com/8a475108c50ca3e7a56a047302228224fc3fa969.png)</center>"}],"translated_statement":"[{\"iden\":\"statement\",\"content\":\"给定一个整数 $N$。考虑所有在坐标轴上端点为整数点、且坐标介于 0 和 $N$ 之间（含端点）的线段；共有 $\\\\frac{(N+1)(N+2)}{2}$ 条这样的线段。\\n\\n你希望将这些线段绘制在若干层中，使得每层中的线段互不重叠（但端点可以接触）。你*不能*将线段移动到坐标轴上的其他位置。\\n\\n求出绘制这些线段所需的最少层数。\\n\\n输入仅一行，包含一个整数 $N$（$1 ≤ N ≤ 100$）。\\n\\n输出一个整数——为给定 $N$ 绘制所有线段所需的最少层数。\\n\\n例如，下图展示了当 $N = 4$ 时的线段及其在各层中的最优排列方式。\\n\\n\"},{\"iden\":\"input\",\"content\":\"输入仅一行，包含一个整数 $N$（$1 ≤ N ≤ 100$）。\"},{\"iden\":\"output\",\"content\":\"输出一个整数——为给定 $N$ 绘制所有线段所需的最少层数。\"},{\"iden\":\"examples\",\"content\":\"输入2输出2输入3输出4输入4输出6\"},{\"iden\":\"note\",\"content\":\"例如，下图展示了当 $N = 4$ 时的线段及其在各层中的最优排列方式。 \"}]}","sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ N \\in \\mathbb{Z} $, with $ 1 \\leq N \\leq 100 $.  \nLet $ \\mathcal{S} = \\{ [i, j] \\mid 0 \\leq i \\leq j \\leq N \\} $ be the set of all integer-coordinate segments on $[0, N]$.\n\n**Constraints**  \n- $ |\\mathcal{S}| = \\binom{N+1}{2} + (N+1) = \\frac{(N+1)(N+2)}{2} $\n\n**Objective**  \nFind the minimum number of layers $ L $ such that $ \\mathcal{S} $ can be partitioned into $ L $ subsets, where in each subset, no two segments overlap (i.e., for any two segments $[a,b], [c,d]$ in the same subset, either $ b \\leq c $ or $ d \\leq a $).\n\n**Known Result**  \nThe minimal number of layers equals the maximum number of segments that share a common interior point.  \nThis maximum is achieved at the midpoint, and equals $ \\left\\lfloor \\frac{N}{2} \\right\\rfloor + 1 $.  \n\nThus:  \n$$\nL = \\left\\lfloor \\frac{N}{2} \\right\\rfloor + 1\n$$","simple_statement":null,"has_page_source":false}