Problems
Strange ice hockey tournament
Strange ice hockey tournament
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?
Input data
A single number - the number of participating teams k (3 ≤ k ≤ 2000000001).
Output data
A single number - the answer to the question posed in the problem.
Examples
Input example #1
11
Output example #1
30