PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#SCKTCUOIKI0007. Tính tổng từ 1 đến n (Sum from 1 to N)

Bài tập này chưa được xếp vào lộ trình.

Tính tổng từ 1 đến n (Sum from 1 to N)

Sum from 1 to N

**Version: Phuoc Hung OJ Extended

Problem Statement

Given a positive integer nn, compute S=1+2+3+⋯+nS=1+2+3+\cdots+n. In this exercise, use a loop to accumulate the sum of all integers from 11 through nn.

Input

The only line contains the integer nn.

Output

Print exactly one integer equal to SS.

Subtasks

  • Subtask 1 (20 points): 1≤n≤151\le n\le15.
  • Subtask 2 (30 points): 1≤n≤1001\le n\le100.
  • Subtask 3 (50 points): 1≤n≤10001\le n\le1000.

Examples

Input

5

Output

15

Explanation

For n=5n=5, accumulate the values: 0+1=10+1=1, 1+2=31+2=3, 3+3=63+3=6, 6+4=106+4=10, and 10+5=1510+5=15. Therefore print 15.