Problems
432 - Triangular Number
SUBMIT PROBLEM

Triangular Number

Time Limit: 1 sec

 

The Problem

A triangular number or triangle number counts the objects that can form an equilateral triangle, as in the diagram on the below. The nth triangular number is the number of dots composing a triangle with n dots on a side.

Simply, Triangular numbers are numbers that create triangle. 

 

 

So,

1st triangular number is 1

2nd triangular number is 3

3rd triangular number is 6

and so on....

 

Make a simple program that reads one variable named n. Calculate and print the nth triangular number.

 

The Input

Input file contain a series of line, each line contain 1 integer number n (0<n<100000000). Input is terminated by EOF.

 

The Output

For each line of input, output will be the nth triangular number in a seperate line.

 

Sample Input

1

4

2

 

Sample Output

1

10

3

 

 

 

Problem Setter: Shahin ShamS