A string of letters A,B, C is forbidden if there are three consecutive letters from which one is A, one is B and one is C. For example, BAACAACCBAAA is forbidden, while AABBCCAABB is not.
How many such strings of length n are not forbidden?
Each line contains one number n (1≤n≤30).
For each input value of n print in a separate line the number of strings of length n are not forbidden.