#PCBSAU0000010. Tổng từ 1 đến n (Sum of the First N Integers)
Tổng từ 1 đến n (Sum of the First N Integers)
Sum of the First N Integers
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem Statement
Given a positive integer , compute using a closed formula without loops.
Input
One line containing integer .
Output
Print .
Subtask
- Subtask 1 — 100 points: .
Example
Input
5
Output
15
Explanation
For , the sum is . The formula gives the same result, so print 15.