#P5722. Sum of Natural Numbers

    ID: 18950 Type: Default 1000ms 256MiB

Sum of Natural Numbers

Sum of Natural Numbers

Calculate the sum of the first (n) natural numbers, i.e., (1 + 2 + 3 + \cdots + n).

Note: You are not allowed to use the arithmetic series summation formula directly.

inputFormat

A single line containing an integer (n) where (1 \leq n \leq 100).

outputFormat

Output the sum of the first (n) natural numbers.

sample

5
15