Problems
10032 - Triangle
SUBMIT PROBLEM

Triangle

Time Limit: 1 sec

 

The Problem

Suppose you have N triangles of different sizes and you want to put all the triangles in a single triangle. What will happen??

It will simply increase the number of triangles. As example you can see

If N is the number of triangle you can have M triangles from that

N = 1, you will have M = 1 triangle,
N = 2, you will have M = 4 triangle,
N = 3, you will have M = 7 triangle, and goes on … 


Your task is to find out how many triangle you may create with N triangle. 

 

The Input

The input file contains several lines of input. Each line contain an integer N (0<N <= 1000). Input is terminated by EOF.

 

The Output

For each line of input, output will show the integer number denotes number of triangle you may create with N triangle in a separated line.

 

Sample Input

1

3

5

 

Sample Output

1

7

13

 

 

 

[School Level]

1st Online Programming Contest 2016 by Outsbook

Problem Setter: Shaquib Mahmud