eolymp
bolt
Try our new interface for solving problems
Problems

Strange ice hockey tournament

Strange ice hockey tournament

Time limit 0.5 seconds
Memory limit 64 MiB

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 (3k2000000001).

Output data

A single number - the answer to the question posed in the problem.

Examples

Input example #1
11
Output example #1
30
Author Анатолий Присяжнюк
Source Open and Distance Olympiads 2011-2012