Skip to main content

~/algor $ cat contests/round-7/BC

BC. Crossings of diagonals

Problem BC ICPC rules 1000 ms 64 MB

All diagonals of a convex -gon are drawn. No three diagonals meet at one point inside the polygon. At how many points inside the polygon do the diagonals cross?

A convex polygon with all its diagonals and the inner points where they cross

Input

One positive integer .

Output

One integer — the number of crossing points.

Note

Examples

Input #1
5
Output #1
5
Input #2
6
Output #2
15

Sign in to submit a solution

Signing up is free and takes a minute.