Triangles in Level N

Given N, you need to count and return the number of triangles present in the level N.

Level of a triangle is illustrated in the following images -

Alt text

Input format : Integer N

Sample Input 1 :
2
Sample Output 1 :
5
Sample Input 2 :
3
Sample Output 2 :
13
Sample Input 3 :
4
Sample Output 3 :
27

Login to submit your solution

Fb dab53a1a64929320dc7425896aa73fd9e5512b6ab52e414ff5f3ebb5cecc73eb

Share Problem