#C2821. Triangular Numbers

    ID: 46180 Type: Default 1000ms 256MiB

Triangular Numbers

Triangular Numbers

A triangular number, also known as a triangle number, is a number that can be represented in the shape of an equilateral triangle. The \(n\)th triangular number is computed by summing up the first \(n\) positive integers and is given by the formula:

\(T(n)=\frac{n(n+1)}{2}\)

This problem requires you to compute the \(n\)th triangular number.

inputFormat

The input consists of a single integer \(n\) (e.g., 1 \le n \le 10^4) provided via standard input.

outputFormat

Output a single integer representing the \(n\)th triangular number computed using the formula \(T(n)=\frac{n(n+1)}{2}\).

## sample
1
1