Segments

题意翻译

给出 $\frac{n(n+1)}{2}$ 个线段,它们的左端点恰好取遍 $1 \dots n$,右端点恰好取遍 $l+1 \dots n+1$($l$ 为左端点)。 举个例子,当 $n=4$ 时,一共 $10$ 个线段: - $1\dots2$ - $1\dots3$ - $1\dots4$ - $1\dots5$ - $2\dots3$ - $2\dots4$ - $2\dots5$ - $3\dots4$ - $3\dots5$ - $4\dots5$ 移动时不能将重叠的部分移动到同一层,问你将它们移动到一起,所需要的最少层数。(详见样例图) 翻译贡献者:诡辩巫师

题目描述

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 ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF909B/150441d31156a32e0b2da63844d600138a543898.png) 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 $ .

输入输出格式

输入格式


The only input line contains a single integer $ N $ ( $ 1<=N<=100 $ ).

输出格式


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

输入输出样例

输入样例 #1

2

输出样例 #1

2

输入样例 #2

3

输出样例 #2

4

输入样例 #3

4

输出样例 #3

6

说明

As an example, here are the segments and their optimal arrangement into layers for $ N=4 $ . ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF909B/d28bd213a6c0995aff826b2bebd914bef9ec9fa5.png)