Problems

# Strange ice hockey tournament

# Strange ice hockey tournament

Forest dwellers, knownto youontaskin "1326. Inthe presentplay hockey..." и "1961. Forestresidents" spend theirstrangetournament, whichisnowknowninmanycircles.It is known thatthe tournamentinvolvedteams**k**andatthe moment amongallthree teamsare at least twohave not playedwith each other.What is the maximumnumber of matchesmaybe playedat the moment?

**Input**

A single number- the number ofparticipating teams**k** (**3** ≤ **k** ≤ **2000000001**).

**Output**

A single number- the answerto the question posedin the problem.

Input example #1

11

Output example #1

30