Strange ice hockey tournament#2070

Strange ice hockey tournament

0.5 seconds
64 megabytes
Very easy

Forest dwellers, known from the problems "1326. In the present play hockey..." and "1961. Forest residents", are holding their strange tournament, the number of rounds of which is not known. It is known that the tournament involves teams, and at the moment, among any three teams, at least two have not played with each other. What is the maximum number of matches that could have been played so far?

Input

A single number — the number of participating teams (3 \leq k \leq 2000000001).

Output

A single number — the answer to the question stated in the problem.

Examples

Example 1

Loading
Loading