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: N = int(input())
  mod = int(1e9 + 7)
  
  dp = [[[[0 for _ in range(4)] for _ in range(4)] for _ in range(4)] for _ in range(N)]
  for i in range(4):
      for j in range(4):
          for k in range(4):
              dp[2][i][j][k] = 1
  dp[2][2][1][0] = 0
  dp[2][1][2][0] = 0
  dp[2][2][0][1] = 0
  
  for i in range(3, N):
      for x in range(4):
          for y in range(4):
              dp[i][0][x][y] = (
                  dp[i - 1][x][y][0]
                  + dp[i - 1][x][y][1]
                  + dp[i - 1][x][y][2]
                  + dp[i - 1][x][y][3]
              )
              dp[i][1][x][y] = (
                  dp[i - 1][x][y][0]
                  + dp[i - 1][x][y][1]
                  + dp[i - 1][x][y][2]
                  + dp[i - 1][x][y][3]
              )
              dp[i][2][x][y] = (
                  dp[i - 1][x][y][0]
                  + dp[i - 1][x][y][1]
                  + dp[i - 1][x][y][2]
                  + dp[i - 1][x][y][3]
              )
              dp[i][3][x][y] = (
                  dp[i - 1][x][y][0]
                  + dp[i - 1][x][y][1]
                  + dp[i - 1][x][y][2]
                  + dp[i - 1][x][y][3]
              )
  
      dp[i][2][3][1] -= dp[i - 1][3][1][0]
      dp[i][2][1][3] -= dp[i - 1][1][3][0]
      dp[i][2][0][1] -= dp[i - 1][0][1][0]
      dp[i][2][1][0] -= dp[i - 1][1][0][0]
      dp[i][2][1][1] -= dp[i - 1][1][1][0]
  
      dp[i][1][2][0] = 0
      dp[i][2][0][1] = 0
      dp[i][2][1][0] = 0
  
  
  ans = 0
  for i in range(4):
      for j in range(4):
          for k in range(4):
              ans = (ans + dp[N - 1][i][j][k]) % 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."}]