Probability#472

Probability

1 second
64 megabytes
Very easy

Vasylko has invented a new game that uses a strip of three consecutive cells, chips of different types, and an opaque bag.

At the beginning of the game, an equal number of chips of each type are placed into the bag. The player draws chips from the bag one at a time and places them into the cells of the strip in the order they are drawn. The player wins if any two adjacent cells contain the same type of chip.

After playing several times, sometimes winning and sometimes losing, Vasylko became curious about his luck and how his winning frequency compares to the average.

To estimate the average winning frequency, Vasylko decided to calculate the ratio of the number of winning configurations to the total number of possible configurations for filling the strip. He found that the total number of configurations is N^3, but he needs your help to find the number of winning configurations.

Input

The first line contains the integer (1 \leq N \leq 10) — the number of different types of chips.

Output

Output a single integer — the number of winning configurations for filling the strip with these chips.

Examples

Example 1

Loading
Loading