시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 (추가 시간 없음) 1024 MB35226722879.720%

문제

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.

예제 입력 1

3

예제 출력 1

10

예제 입력 2

5

예제 출력 2

35

예제 입력 3

7777

예제 출력 3

78424644529

출처

University > Delft University of Technology > Freshmen Programming Contest 2024 B번

  • 문제를 만든 사람: Maarten Sijm