Forest dwellers, known to you on task in "1326. In the present play hockey..." и "1961. Forest residents" spend their strange tournament, which is now known in many circles. It is known that the tournament involved teams k and at the moment among all three teams are at least two have not played with each other. What is the maximum number of matches may be played at the moment?
A single number - the number of participating teams k (3 ≤ k ≤ 2000000001).
A single number - the answer to the question posed in the problem.