Preparando MOJI

Hexagonal numbers

2000ms 65536K

Description:

Hexagonal numbers are figurate numbers which can be calculated using the formula hn = 2n2 - n. You are given n; calculate n-th hexagonal number.

Input:

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

Output:

Output the n-th hexagonal number.

Sample Input:

2

Sample Output:

6

Sample Input:

5

Sample Output:

45

Informação

Codeforces

Provedor Codeforces

Código CF130A

Tags

*specialimplementation

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:33:38

Relacionados

Nada ainda