You are given an integer N. Find the number of strings of length N that satisfy the following conditions, modulo 10^9+7:

* The string does not contain characters other than `A`, `C`, `G` and `T`.
* The string does not contain `AGC` as a substring.
* The condition above cannot be violated by swapping two adjacent characters once.

Constraints

* 3 \leq N \leq 100

Input

Input is given from Standard Input in the following format:


N


Output

Print the number of strings of length N that satisfy the following conditions, modulo 10^9+7.

Examples

Input

3


Output

61


Input

4


Output

230


Input

100


Output

388130742
public class Main {
    private static long[][][][] memo = new long[101][85][85][85];
    public static void main(String[]$) {
        System.out.println(dfs(new java.util.Scanner(System.in).nextInt(), ' ', ' ', ' '));
    }

    private static long dfs(int r, char l1, char l2, char l3) {
        return memo[r][l1][l2][l3] != 0 ? memo[r][l1][l2][l3] : (memo[r][l1][l2][l3] = ((r == 1 ? 2 : dfs(r - 1, l2, l3, 'A') + dfs(r - 1, l2, l3, 'T')) + (l2 != 'G' && l3 != 'G' || l1 != 'A' && l2 != 'A' && l3 != 'A' ? r == 1 ? 1 : dfs(r - 1, l2, l3, 'C') : 0) + (l2 != 'A' || l3 != 'C' ? r == 1 ? 1 : dfs(r - 1, l2, l3, 'G') : 0)) % 1000000007);
    }
}