#K59662. Minimum Total Time
Minimum Total Time
Minimum Total Time
You are given a single integer n representing the number of teams and the number of tasks. Each team performs exactly one unique task, and the time it takes for team i to complete task j is given by the formula:
\( |i - j| + 1 \)
Your goal is to assign exactly one task to each team so that the total completion time is minimized. It can be shown that this minimum total time is equal to the sum of the first n natural numbers, which can be expressed in closed form as:
\( \frac{n(n+1)}{2} \)
Compute and output this minimum total time.
inputFormat
The input consists of a single line containing one integer n (1 ≤ n ≤ 104).
outputFormat
Output the minimum total time needed to complete all tasks.
Make sure your output does not include any extra spaces or newlines.
## sample3
6
</p>