Yellow Jackets - 2017 - Practice #3

Start

2017-09-13 23:10 CEST

Yellow Jackets - 2017 - Practice #3

End

2017-09-14 00:10 CEST
The end is near!
Contest is over.
Not yet started.
Contest is starting in -71 days 1:04:11

Time elapsed

1:00:00

Time remaining

0:00:00

Problem F
Sjecista

Consider a convex polygon with $N$ vertices, with the additional property that no three diagonals intersect in a single point. Find the number of intersections between pairs of diagonals in such a polygon.

The figure below shows one such polygon with 6 vertices.

\includegraphics[width=5cm]{hexagon.png}

Note that a polygon is convex if all of its interior angles are less than 180 degrees.

Input

The first and only line of input contains a single integer $N, 3\leq N\leq 100$ denoting the number of vertices.

Output

Output the number of intersections on a single line.

Sample Input 1 Sample Output 1
3
0
Sample Input 2 Sample Output 2
4
1
Sample Input 3 Sample Output 3
6
15