#C6107. Total Tournament Matches

    ID: 49831 Type: Default 1000ms 256MiB

Total Tournament Matches

Total Tournament Matches

In a tournament, every player plays against every other player exactly once. Given the number of players \(N\), you are required to compute the total number of matches that will be played. The calculation is based on the combinatorial formula for choosing 2 players out of \(N\):

\( \frac{N \times (N-1)}{2} \)

Use this formula to determine the result.

inputFormat

The input consists of a single line containing one integer (N) ((2 \leq N \leq 10^9)) which denotes the number of players.

outputFormat

Output a single integer representing the total number of matches played in the tournament.## sample

4
6

</p>