PivotOJ

SJECIŠTA

시간 제한: 1000ms메모리 제한: 128MB출처: COCI 2006-2007BOJ 3049

문제

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. 

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

입력

The first and only line of input contains a single integer N, 3 ≤ N ≤ 100. 

 

출력

Output the number of intersections on a single line. 

 

예제

예제 1

입력
3
출력
0

예제 2

입력
4
출력
1

예제 3

입력
6
출력
15
코드를 제출하려면 로그인하세요.