Problem1074--平面直线交点问题

1074: 平面直线交点问题

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MiB

Description

平面上,两条直线有1个交点,三条直线有3个交点,……,那么N条直线最多有多少个交点?

Input

一行:一个整数n, 1<=n<=1000

Output

一行:一个整数

Sample Input Copy

4

Sample Output Copy

6

Source/Category