Skip to main content

~/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:

A convex hexagon: n vertices, diagonals drawn from each vertex to the non-adjacent ones

Input

One positive integer .

Output

One integer — .

Note

Examples

Input #1
5
Output #1
5
Input #2
4
Output #2
2

Sign in to submit a solution

Signing up is free and takes a minute.