#C5427. Minimal Sequence Sum

    ID: 49075 Type: Default 1000ms 256MiB

Minimal Sequence Sum

Minimal Sequence Sum

Problem Description:

Given a positive integer (n), construct a sequence (a_1, a_2, \ldots, a_n) of positive integers such that for each (i) (where (1 \le i \le n)), the condition (a_i \ge i) holds. The goal is to minimize the sum of the sequence.

The minimum sum is achieved when (a_i = i) for every (i), which yields the sum (\frac{n(n+1)}{2}).

Your task is to read the integer from standard input and print the minimal sequence sum to standard output.

inputFormat

Input Format:
A single integer (n) (with (0 \le n \le 10^9)). The integer is provided via standard input.

outputFormat

Output Format:
Print a single integer representing the minimal possible sum of the sequence, which is (\frac{n(n+1)}{2}).## sample

1
1