#P2726. Summing Natural Numbers
Summing Natural Numbers
Summing Natural Numbers
Given a non-negative integer n, compute the sum of all integers from 1 to n inclusive. Use the formula: \( S = \frac{n(n+1)}{2} \) to calculate the sum.
The input consists of a single integer n provided on one line. You are to output the computed sum.
inputFormat
A single integer n (0 ≤ n ≤ 10^9).
outputFormat
Output a single integer which is the sum of all numbers from 1 to n.
sample
0
0