~/algor $ cat contests/round-7/M
M. Diagonals of a polygon
Problem M
ICPC rules
1000 ms
64 MB
The number of vertices of a convex polygon is given. Find the number of its diagonals . A diagonal is a segment joining two non-adjacent vertices:
Input
One positive integer .
Output
One integer — .
Note
Examples
Input #1
5
Output #1
5
Input #2
4
Output #2
2