using System;
using System.Collections.Generic;
using System.IO;
using System.Runtime.Remoting.Messaging;
using System.Security.Cryptography;
using System.Text;

namespace Contest
{
    class Program
    {
        private int Mod = 1000000007;
        private int[,,,] memo = new int[101, 4, 4, 4];
        public void Solve()
        {
            var sc = new Scanner();
            int N = sc.NextInt();
            long ans = 0;
            for (int i = 0; i <= N; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    for (int k = 0; k < 4; k++)
                    {
                        for (int l = 0; l < 4; l++)
                        {
                            memo[i, j, k, l] = -1;
                        }
                    }
                }
            }
            for (int i = 0; i < 4; i++)
            {
                for (int j = 0; j < 4; j++)
                {
                    for (int k = 0; k < 4; k++)
                    {
                        ans += C(N, i, j, k);
                        ans %= Mod;
                    }
                }
            }
            Console.WriteLine(ans);
        }

        int C(int index, int one, int two, int last)
        {
            if (memo[index, one, two, last] != -1) return memo[index, one, two, last];
            if (index == 3)
            {
                if (Check(-1, one, two, last)) return 1;
                else return 0;
            }
            else
            {
                int res = 0;
                for (int i = 0; i < 4; i++)
                {
                    if (Check(i, one, two, last))
                    {
                        res += C(index - 1, i, one, two);
                        res %= Mod;
                    }
                }

                memo[index, one, two, last] = res;
                return res;
            }
        }

        bool Check(int i, int j, int k, int l)
        {
            if (i == 0 && j == 2 && k == 1) return false;
            if (i == 0 && j == 1 && k == 2) return false;
            if (i == 2 && j == 0 && k == 1) return false;
            if (i == 0 && j == 2 && l == 1) return false;
            if (i == 0 && k == 2 && l == 1) return false;
            if (j == 0 && k == 2 && l == 1) return false;
            if (j == 0 && k == 1 && l == 2) return false;
            if (j == 2 && k == 0 && l == 1) return false;
            return true;
        }


        static void Main(string[] args) => new Program().Solve();
    }

    class Scanner
    {
        private char _separator = ' ';
        private StreamReader _stream = new StreamReader(Console.OpenStandardInput());
        private int _pos = 0;
        private string[] _line = new string[0];
        public string Next()
        {
            if (_pos >= _line.Length)
            {
                _line = _stream.ReadLine().Split(_separator);
                _pos = 0;
            }
            return _line[_pos++];
        }
        public int NextInt() => int.Parse(Next());
        public long NextLong() => long.Parse(Next());
        public double NextDouble() => double.Parse(Next());
        public string[] Array()
        {
            if (_pos >= _line.Length)
                _line = _stream.ReadLine().Split(_separator);
            _pos = _line.Length;
            return _line;
        }
        public int[] IntArray()
        {
            var arr = Array();
            var res = new int[arr.Length];
            for (int i = 0; i < arr.Length; i++)
            {
                res[i] = int.Parse(arr[i]);
            }
            return res;
        }
        public long[] LongArray()
        {
            var arr = Array();
            var res = new long[arr.Length];
            for (int i = 0; i < arr.Length; i++)
            {
                res[i] = long.Parse(arr[i]);
            }
            return res;
        }
        public double[] DoubleArray()
        {
            var arr = Array();
            var res = new double[arr.Length];
            for (int i = 0; i < arr.Length; i++)
            {
                res[i] = double.Parse(arr[i]);
            }
            return res;
        }
    }
}


Measured memory_bytes: 13232