Forbidden Strings#1554

Forbidden Strings

1 second
128 megabytes
Very easy

A string consisting of the letters , , and is called forbidden if it contains three consecutive letters, one of which is , one is , and one is . For example, the string BAACAACCBAAA is forbidden, while AABBCCAABB is not.

Calculate the number of non-forbidden strings of length .

Input

Each line contains a single integer n~(1 \le n \le 30).

Output

For each input value of , print on a separate line the number of non-forbidden strings of length .

Examples

Example 1

Loading
Loading