<PREV Problem:
NEXT>
Solved by 209 users: ...
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 
 < 

Knight's move

Time limit = 1 second

Chess association decided to assign new phone numbers to all the members. The new numbers should be produced with a knight's move on a phone keypad. 0 and 8 are not valid leading digits. For instance, the number 340-49-27 matches the criteria.

789
456
123
 0 

Create a program that computes the number of different phone numbers with a length N.

Input Integer N ( 1 ≤ N ≤ 100 )

Output Number of valid phone numbers

Input#1
2
Output#1
16

Author:
Peculiarities of national computer science problems
2000

<PREV | Problem set | Search related messages | NEXT>


© acm.mipt DevGroup
The page was generated in 200ms

SW soft NIX
ID = 23.20.13.165