Consider a convex polygon with
The figure below shows one such polygon with 6 vertices.
Note: a polygon is convex if all of its interior angles are less than 180 degrees.
Input Specification
The first and only line of input contains a single integer
Output Specification
Output the number of intersections on a single line.
Sample Input 1
Copy
3
Sample Output 1
Copy
0
Sample Input 2
Copy
4
Sample Output 2
Copy
1
Sample Input 3
Copy
6
Sample Output 3
Copy
15
Comments