3D Maze problem
Suppose, an ant is
trapped in a maze, with only one way in and one way out.
The maze is a cubiclattice like structure of dimension NxNxN (Length=Breadth=Height=N). The way in is the leftbottom most point, and the way out is the right topmost point (along the principal diagonal). The below picture shows the maze for N=2.
The maze is a cubiclattice like structure of dimension NxNxN (Length=Breadth=Height=N). The way in is the leftbottom most point, and the way out is the right topmost point (along the principal diagonal). The below picture shows the maze for N=2.
Figure 1.
Assuming the ant only moves right, forward or
upwards along the grids of the maze, calculate the total number of ways in
which the ant can escape. Mathematically right, forward and upwards are defined
at positive changes in coordinates on x, y and z axes respectively.
Example:
For, N=1, the grid structure and solution is shown below:
Example:
For, N=1, the grid structure and solution is shown below:
Figure 2.
Thus, for N=1, we have a net of 6 ways.
Input Format:
Single integer N
Single integer N
Output Format:
Output also consists of a single number corresponding to the number of ways the ant can escape the maze.
Output also consists of a single number corresponding to the number of ways the ant can escape the maze.
Constraints:
 0<N<=8
Example
Example
Number

Sample
Input

Sample
Output

1

1

6 
2

2

90 