#C434. Total Matches in a Tournament
Total Matches in a Tournament
Total Matches in a Tournament
In a tournament where every player competes against every other player exactly once, the total number of matches is determined by the formula:
\( \frac{n(n-1)}{2} \)
Your task is to calculate the total number of matches played given the number of players n.
inputFormat
The input consists of a single integer n (number of players).
outputFormat
Output a single integer representing the total number of matches played in the tournament.
## sample4
6
</p>