DSCS 2013 Triangular and hexagonal grid. Part 2

Hexagon and Rhombic Dominoes

Time limit 1 second
Memory limit 64 MiB

   A regular hexagon with side length n is divided into 6n2 unit triangles.

   Your task is to cover it with rhombic dominoes — pieces composed of two unit triangles sharing a side.

   Each domino must be placed in such a way, that it covers exactly two unit triangles. No triangle must be covered with more than one domino.

   Count the number of ways to do so. For example there are two ways to cover a hexagon with side length 1, they are shown on the picture.

Input data

   Input file contains n (1 ≤ n ≤ 7).

Output data

   Output the number of ways to cover hexagon with rombic dominoes.


Input example #1
Output example #1
Source 2004 Petrozavodsk, Summer, Andrew Stankevich Contest 7, August 22, Problem D