Олимпиадный тренинг

Задача 38574. Number of triangles


Consider a figure similar to the one shown in the figure (a large equilateral triangle made up of small equilateral triangles). The figure shows a figure consisting of 4 levels of triangles.



Write a program that will determine how many triangles there are in total (it is necessary to take into account not only "small" triangles, but in general all triangles — in particular, the triangle in bold, as well as the whole figure, are triangles of interest to us).

Input
Enter one number N — number of levels in the figure (1 ≤ N ≤ 100000).

Imprint
Print  the number of triangles in such a figure.
Examples
# Input Output
1 1 1
2 2 5
3 4 27