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: ## クソみたいな漸化式をクソみたいなコードで書いてしまった
  
  
  def ABC122D_sum():
      return (
          ACT_A[-1]
          + G_A[-1]
          + A_G[-1]
          + GCT_G_G[-1]
          + A_G_G[-1]
          + C_G[-1]
          + A_T_G[-1]
          + GCT_T_G[-1]
          + A_C[-1]
          + GCT_C[-1]
          + A_T[-1]
          + A_G_T[-1]
          + GCT_G_T[-1]
          + CT_T[-1]
      )
  
  
  N = int(input())
  
  mod = int(1e9 + 7)
  
  ## N=3の場合で初項を作る
  ACT_A = [4 * 3 * 1]
  G_A = [4 * 1 * 1]
  A_G = [4 * 1 * 1]
  GCT_G_G = [3 * 1 * 1]
  A_G_G = [1 * 1 * 1]
  C_G = [3 * 1 * 1]
  A_T_G = [1 * 1 * 1]
  GCT_T_G = [3 * 1 * 1]
  A_C = [3 * 1 * 1]
  GCT_C = [4 * 2 * 1 + 3 * 1 * 1]
  A_T = [4 * 1 * 1]
  A_G_T = [1 * 1 * 1]
  GCT_G_T = [3 * 1 * 1]
  CT_T = [4 * 2 * 1]
  # print(ABC122D_sum())
  
  if N == 3:
      print(ABC122D_sum())
      exit()
  
  for i in range(N - 3):
      new_ACT_A = (
          ACT_A[-1]
          + G_A[-1]
          + A_C[-1]
          + GCT_C[-1]
          + A_T[-1]
          + A_G_T[-1]
          + GCT_G_T[-1]
          + CT_T[-1]
      )
      new_G_A = A_G[-1] + GCT_G_G[-1] + A_G_G[-1] + C_G[-1] + A_T_G[-1] + GCT_T_G[-1]
      new_A_G = ACT_A[-1] + G_A[-1]
      new_GCT_G_G = GCT_G_G[-1] + A_G_G[-1] + C_G[-1] + A_T_G[-1] + GCT_T_G[-1]
      new_A_G_G = A_G[-1]
      new_C_G = GCT_C[-1]
      new_A_T_G = A_T[-1]
      new_GCT_T_G = A_G_T[-1] + GCT_G_T[-1] + CT_T[-1]
      new_A_C = ACT_A[-1]
      new_GCT_C = (
          GCT_G_G[-1]
          + C_G[-1]
          + GCT_T_G[-1]
          + A_C[-1]
          + GCT_C[-1]
          + A_T[-1]
          + GCT_G_T[-1]
          + CT_T[-1]
      )
      new_A_T = ACT_A[-1] + G_A[-1]
      new_A_G_T = A_G[-1]
      new_GCT_G_T = GCT_G_G[-1] + A_G_G[-1] + C_G[-1] + A_T_G[-1] + GCT_T_G[-1]
      new_CT_T = A_C[-1] + GCT_C[-1] + A_T[-1] + A_G_T[-1] + GCT_G_T[-1] + CT_T[-1]
      ACT_A.append(new_ACT_A)
      G_A.append(new_G_A)
      A_G.append(new_A_G)
      GCT_G_G.append(new_GCT_G_G)
      A_G_G.append(new_A_G_G)
      C_G.append(new_C_G)
      A_T_G.append(new_A_T_G)
      GCT_T_G.append(new_GCT_T_G)
      A_C.append(new_A_C)
      GCT_C.append(new_GCT_C)
      A_T.append(new_A_T)
      A_G_T.append(new_A_G_T)
      GCT_G_T.append(new_GCT_G_T)
      CT_T.append(new_CT_T)
  
  ans = ABC122D_sum() % 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."}]