Numeric Keypad

medium
1. You are given a number N, which represents the count of buttons pressed on a mobile numeric keypad.
2. You can only press buttons that are up, left, right, down to the current button and the current button also.
3. You can not press bottom row corner buttons(* and #).
<img src="http://pepcoding.com/resources/ojquestionresource/images/nokiakeypad.jpeg">
4. You have to find the count of different numbers that can be generated by pressing N number of buttons.

Input Format

A number N

Output Format

Check the sample output and question video.

Constraints

1 <= N <= 30

Notice

Try First, Check Solution later

1. You should first read the question and watch the question video.
2. Think of a solution approach, then try and submit the question on editor tab.
3. We strongly advise you to watch the solution video for prescribed approach.

Example

Input
2
Output
36
Previous
Min Squares
Next
Probability Of Knight In The Chessboard

Related Questions