Preparando MOJI

Pentagonal numbers

3000ms 262144K

Description:

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.

Sample Input:

2

Sample Output:

5

Sample Input:

5

Sample Output:

35

Informação

Codeforces

Provedor Codeforces

Código CF162A

Tags

*specialimplementation

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:35:07

Relacionados

Nada ainda