1797Count the Regions

1797   Count the Regions

题目描述

What's the maximum number of regions definable by N zig-zag lines, each of which consists of two parallel infinite half-lines joined by a straight line segment?

Here is an example of 2 zig-zag lines yield 12 regions at the most.

输入格式:

The input consists of a sequence of N (<= 10000), which is the number of the zig-zag lines, one per line.

输出格式:

For each N, you should output the number of the maximum regions.

输入样例 复制
1
2
输出样例 复制
2
12

说明

5
11
通过提交
时空限制2000ms/64mb
题目来源
评测方式在线评测
题目类型
难        度