Codeforces celebrates 10 years! We are pleased to announce the crowdfunding-campaign. Congratulate us by the link https://codeforces.com/10years.
×

The following languages are only available languages for the problems from the contest

Surprise Language Round #7:

- FALSE

Virtual contest is a way to take part in past contest, as close as possible to participation on time. It is supported only ICPC mode for virtual contests.
If you've seen these problems, a virtual contest is not for you - solve these problems in the archive.
If you just want to solve some problem from a contest, a virtual contest is not for you - solve this problem in the archive.
Never use someone else's code, read the tutorials or communicate with other person during a virtual contest.

No tag edit access

A. Crystal Ball Sequence

time limit per test

2 secondsmemory limit per test

256 megabytesinput

standard inputoutput

standard outputCrystal 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 *H*_{n} = 3·*n*·(*n* + 1) + 1. You are given *n*; calculate *n*-th element of the sequence.

Input

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

Output

Output the *n*-th element of crystal ball sequence.

Examples

Input

1

Output

7

Input

3

Output

37

Codeforces (c) Copyright 2010-2020 Mike Mirzayanov

The only programming contests Web 2.0 platform

Server time: Feb/18/2020 05:20:33 (h1).

Desktop version, switch to mobile version.

Supported by

User lists

Name |
---|