300845: CF162A. Pentagonal numbers

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

Description

A. Pentagonal numberstime limit per test3 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Pentagonal numbers are figurate numbers which can be calculated using the formula pn = (3n2 - n) / 2 (always integer). You are given n; calculate n-th pentagonal number.

Input

The only line of input contains an integer n (1 ≤ n ≤ 100).

Output

Output the n-th pentagonal number.

ExamplesInput
2
Output
5
Input
5
Output
35

Input

加入题单

上一题 下一题 算法标签: