~/algor $ cat problems/kombinatorika-diagonallar-soni
Number of diagonals of a polygon
Easy
1000 ms
128 MB
30%
How many diagonals does a convex $n$-gon have? A diagonal is a segment joining two non-adjacent vertices.
Input
One positive integer $n$.
Output
One integer — the number of diagonals.
Note
$3 \le n \le 10^{9}$
Examples
Input #1
5
Output #1
5
Input #2
3
Output #2
0