#### Registered Users Only

Please login to utilize this feature.

Do note that this website only supports submissions in C++.

## Problem Description

Observe the following triangles with length *n*

n = 1 * n = 2 * ** n = 3 * ** *** n = 4 * ** *** **** n = 5 * ** *** **** *****

Your task is to find the number of asterisks, (triangle numbers) given the length of the triangle, *n*.

## Input

A single integer, *n*, which denotes the length of the triangle.

## Output

A single number, the number of asterisks in the triangle.

## Sample Input

3

## Sample Output

6

### Tags

### Subtasks and Limits

Subtask | Score | #TC | Time | Memory | Scoring |
---|---|---|---|---|---|

1 | 0 | 1 | 1s | 32MB | Average |

2 | 100 | 10 | 1s | 32MB | Average |

### Judge Compile Command

g++ ans.cpp -o trianglenumbers -Wall -static -O2 -lm -m64 -s -w -std=gnu++14 -fmax-errors=512