#P470A. Crystal Ball Sequence

    普及- ID: 6765 远端评测题 2000ms 256MiB 尝试: 0 已通过: 0 难度: 4 上传者: 标签>*special problemimplementation*1400

Crystal Ball Sequence

Description

Crystal ball sequence on hexagonal lattice is defined as follows: n-th element is the number of lattice points inside a hexagon with (n + 1) points on each side. The formula is Hn = 3·n·(n + 1) + 1. You are given n; calculate n-th element of the sequence.

The only line of input contains an integer n (0 ≤ n ≤ 9).

Output the n-th element of crystal ball sequence.

Input

The only line of input contains an integer n (0 ≤ n ≤ 9).

Output

Output the n-th element of crystal ball sequence.

1

3

7

37