405208: GYM101845 E Equilateral Triangles

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Equilateral Trianglestime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

Yeison drew an equilateral triangle of side length n cm. Then for each side of the triangle he drew n - 1 lines parallel to it, with 1 cm of separation between them. Now the big triangle contains n2 equilateral small triangles of side length 1.

Let S be the set of all points that are vertices of any of the small triangles, now he is interested in knowing how many different pairs of points {a, b} where contain some other point and c ≠ b in the line segment ab, two pairs {a1, b1} and {a2, b2} are considered equal if a1 = a2 and b1 = b2 or if a1 = b2 and b1 = a2, two pairs are different if they are not equal.

For n = 3 the triangle drew by him would be the following:

Help Yeison to solve this problem.

Input

The input consist of a single integer n (1 ≤ n ≤ 50) - the length of the triangle drew by Yeison.

Output

Print one single integer - the answer of the problem.

ExamplesInput
2
Output
3
Input
3
Output
12

加入题单

上一题 下一题 算法标签: