How many n-digit numbers can be formed using only the digits 5 and 9, such that no three identical digits appear consecutively?
One integer n~(n \le 30).
Print the number of such n-digit numbers.
Example 1