Building Pyramids

시간 제한1초메모리 제한1024 MB

문제

At long last, the cats have finally set aside their squabbles with the coatis and the bees. They decide to build a monument to commemorate the end of their feud. To show that such different animals can live together in harmony, the Great Architect Principal Coati decides that this monument should consist of two completely different three-dimensional shapes: the triangular pyramid (for having very sharp corners) and the sphere (for having no corners at all). The idea is to create a large regular tetrahedron out of many small spheres, similar to the one shown in Figure B.1.

Figure B.1: A triangular pyramid of spheres, corresponding to the second sample input. One edge of the pyramid contains $5$ spheres, so the entire pyramid consists of $35$ spheres.

Image CC BY-NC 2.0 by Amafirlian on Flickr

Alicia the coati, Beesworth the bee, and Darabella the cat would like this monument to be as large as possible. They have designated a piece of land to place the monument on, and have determined how many spheres should be in one of the edges based on where the monument will be placed. How many spheres will the entire pyramid contain, knowing the number of spheres in one of the edges?

입력

The input consists of:

  • One line with an integer $n$ ($1\leq n\leq 10^6$), the number of spheres in one of the edges of the pyramid.

출력

Output the number of spheres in the entire pyramid.