Codeforces Round 455 (Div. 2)
B
Segments
Codeforces
1300
原题
← AC →
翻译中…

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 image of them.

翻译中…

You 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.

翻译中…

Find the minimal number of layers you have to use for the given $*N*$.

翻译中…

Input

翻译中…

The only input line contains a single integer $*N*$ ($1 ≤ *N* ≤ 100$).

翻译中…

Output

翻译中…

Output a single integer - the minimal number of layers required to draw the segments for the given $*N*$.

翻译中…

Note

翻译中…

As an example, here are the segments and their optimal arrangement into layers for $*N* = 4$.

翻译中…

image

翻译中…

样例

Input #1
2
Output #1
2
InputCopy OutputCopy
Input #2
3
Output #2
4
InputCopy OutputCopy
Input #3
4
Output #3
6
InputCopy OutputCopy
题目信息
题号
909B
时间限制
2 s
内存限制
256 MB
标签
构造
数学

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