P29736 [洛谷] [COCI2006-2007#2] INTERSECTIONS
普及+
题目描述

Problem Description

Consider a convex polygon with \( n \) vertices, where no three (or more) diagonals intersect at a single point.

Your task is to determine the number of intersection points of the diagonals of such a polygon.

Input Format

The input consists of a single integer \( n \).

Output Format

Output a single integer representing the answer.

Sample Input and Output

Sample Input #1

3

Sample Output #1

0

Sample Input #2

4

Sample Output #2

1

Sample Input #3

6

Sample Output #3

15

Notes

Sample 3 Explanation

Image

Data Range and Constraints

For all test cases, it is guaranteed that \( 3 \leq n \leq 100 \).

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
3
样例输出
0