output_description: Print the number of strings of length N that satisfy the following conditions,
  modulo 10^9+7.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      N
attempt: MOD = 10**9 + 7
  aa = ["A", "C", "G", "T"]
  dic = {}
  invdic = {}
  n = int(input())
  for i in range(4):
      for j in range(4):
          for k in range(4):
              dic[16 * i + 4 * j + k] = aa[i] + aa[j] + aa[k]
              invdic[aa[i] + aa[j] + aa[k]] = 16 * i + 4 * j + k
  
  
  dp = [[0 for j in range(64)] for i in range(101)]
  
  for i in range(64):
      dp[3][i] = 1
  
  dp[3][invdic["AGC"]] = 0
  dp[3][invdic["GAC"]] = 0
  dp[3][invdic["ACG"]] = 0
  
  for i in range(3, 100):
      for j in range(64):
          moji = dic[j]
          if (
              (moji[0] == "A" and moji[2] == "G")
              or (moji[0] == "A" and moji[1] == "G")
              or (moji[1] == "A" and moji[2] == "G")
              or (moji[1] == "G" and moji[2] == "A")
          ):
              dp[i + 1][invdic[moji[1] + moji[2] + "A"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "A"]] + dp[i][j]
              ) % MOD
              dp[i + 1][invdic[moji[1] + moji[2] + "G"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "G"]] + dp[i][j]
              ) % MOD
              dp[i + 1][invdic[moji[1] + moji[2] + "T"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "T"]] + dp[i][j]
              ) % MOD
          elif moji[1] == "A" and moji[2] == "C":
              dp[i + 1][invdic[moji[1] + moji[2] + "A"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "A"]] + dp[i][j]
              ) % MOD
              dp[i + 1][invdic[moji[1] + moji[2] + "C"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "C"]] + dp[i][j]
              ) % MOD
              dp[i + 1][invdic[moji[1] + moji[2] + "T"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "T"]] + dp[i][j]
              ) % MOD
          else:
              dp[i + 1][invdic[moji[1] + moji[2] + "A"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "A"]] + dp[i][j]
              ) % MOD
              dp[i + 1][invdic[moji[1] + moji[2] + "C"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "C"]] + dp[i][j]
              ) % MOD
              dp[i + 1][invdic[moji[1] + moji[2] + "T"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "T"]] + dp[i][j]
              ) % MOD
              dp[i + 1][invdic[moji[1] + moji[2] + "G"]] = (
                  dp[i + 1][invdic[moji[1] + moji[2] + "G"]] + dp[i][j]
              ) % MOD
  
  
  ans = 0
  
  for i in range(64):
      ans = (ans + dp[n][i]) % MOD
  
  print(ans)
  
problem_description: Statement
  
  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.
samples: [{"input": "3", "output": "61\n    \n\nThere are 4^3 = 64 strings of length 3 that do not contain characters other\nthan `A`, `C`, `G` and `T`. Among them, only `AGC`, `ACG` and `GAC` violate\nthe condition, so the answer is 64 - 3 = 61.\n\n* * *"}, {"input": "4", "output": "230\n    \n\n* * *"}, {"input": "100", "output": "388130742\n    \n\nBe sure to print the number of strings modulo 10^9+7."}]