Problems
#864
~/algor $ cat problems/iEAlPMj8EUq8
Crossings of diagonals
Hidden (link only)
Medium
1000 ms
64 MB
58%
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?
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