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())
  (
      AAA,
      AAG,
      AAC,
      AAT,
      AGA,
      AGG,
      AGC,
      AGT,
      ACA,
      ACG,
      ACC,
      ACT,
      ATA,
      ATG,
      ATC,
      ATT,
      GAA,
      GAG,
      GAC,
      GAT,
      GGA,
      GGG,
      GGC,
      GGT,
      GCA,
      GCG,
      GCC,
      GCT,
      GTA,
      GTG,
      GTC,
      GTT,
      CAA,
      CAG,
      CAC,
      CAT,
      CGA,
      CGG,
      CGC,
      CGT,
      CCA,
      CCG,
      CCC,
      CCT,
      CTA,
      CTG,
      CTC,
      CTT,
      TAA,
      TAG,
      TAC,
      TAT,
      TGA,
      TGG,
      TGC,
      TGT,
      TCA,
      TCG,
      TCC,
      TCT,
      TTA,
      TTG,
      TTC,
      TTT,
  ) = (
      1,
      1,
      1,
      1,
      1,
      1,
      0,
      1,
      1,
      0,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      0,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
      1,
  )
  for i in range(N - 3):
      (
          AAA,
          AAG,
          AAC,
          AAT,
          AGA,
          AGG,
          AGC,
          AGT,
          ACA,
          ACG,
          ACC,
          ACT,
          ATA,
          ATG,
          ATC,
          ATT,
          GAA,
          GAG,
          GAC,
          GAT,
          GGA,
          GGG,
          GGC,
          GGT,
          GCA,
          GCG,
          GCC,
          GCT,
          GTA,
          GTG,
          GTC,
          GTT,
          CAA,
          CAG,
          CAC,
          CAT,
          CGA,
          CGG,
          CGC,
          CGT,
          CCA,
          CCG,
          CCC,
          CCT,
          CTA,
          CTG,
          CTC,
          CTT,
          TAA,
          TAG,
          TAC,
          TAT,
          TGA,
          TGG,
          TGC,
          TGT,
          TCA,
          TCG,
          TCC,
          TCT,
          TTA,
          TTG,
          TTC,
          TTT,
      ) = (
          AAA + GAA + CAA + TAA,
          AAA + GAA + CAA + TAA,
          AAA + GAA + CAA + TAA,
          AAA + GAA + CAA + TAA,
          AAG + GAG + CAG + TAG,
          AAG + GAG + CAG + TAG,
          0,
          AAG + GAG + CAG + TAG,
          AAC + GAC + CAC + TAC,
          0,
          AAC + GAC + CAC + TAC,
          AAC + GAC + CAC + TAC,
          AAT + GAT + CAT + TAT,
          AAT + GAT + CAT + TAT,
          AAT + GAT + CAT + TAT,
          AAT + GAT + CAT + TAT,
          AGA + GGA + CGA + TGA,
          AGA + GGA + CGA + TGA,
          0,
          AGA + GGA + CGA + TGA,
          AGG + GGG + CGG + TGG,
          AGG + GGG + CGG + TGG,
          GGG + CGG + TGG,
          AGG + GGG + CGG + TGG,
          AGC + GGC + CGC + TGC,
          AGC + GGC + CGC + TGC,
          GGC + CGC + TGC,
          AGC + GGC + CGC + TGC,
          AGT + GGT + CGT + TGT,
          AGT + GGT + CGT + TGT,
          GGT + CGT + TGT,
          AGT + GGT + CGT + TGT,
          ACA + GCA + CCA + TCA,
          ACA + GCA + CCA + TCA,
          ACA + GCA + CCA + TCA,
          ACA + GCA + CCA + TCA,
          ACG + GCG + CCG + TCG,
          ACG + GCG + CCG + TCG,
          GCG + CCG + TCG,
          ACG + GCG + CCG + TCG,
          ACC + GCC + CCC + TCC,
          ACC + GCC + CCC + TCC,
          ACC + GCC + CCC + TCC,
          ACC + GCC + CCC + TCC,
          ACT + GCT + CCT + TCT,
          ACT + GCT + CCT + TCT,
          ACT + GCT + CCT + TCT,
          ACT + GCT + CCT + TCT,
          ATA + GTA + CTA + TTA,
          ATA + GTA + CTA + TTA,
          ATA + GTA + CTA + TTA,
          ATA + GTA + CTA + TTA,
          ATG + GTG + CTG + TTG,
          ATG + GTG + CTG + TTG,
          GTG + CTG + TTG,
          ATG + GTG + CTG + TTG,
          ATC + GTC + CTC + TTC,
          ATC + GTC + CTC + TTC,
          ATC + GTC + CTC + TTC,
          ATC + GTC + CTC + TTC,
          ATT + GTT + CTT + TTT,
          ATT + GTT + CTT + TTT,
          ATT + GTT + CTT + TTT,
          ATT + GTT + CTT + TTT,
      )
  print(
      (
          AAA
          + AAG
          + AAC
          + AAT
          + AGA
          + AGG
          + AGC
          + AGT
          + ACA
          + ACG
          + ACC
          + ACT
          + ATA
          + ATG
          + ATC
          + ATT
          + GAA
          + GAG
          + GAC
          + GAT
          + GGA
          + GGG
          + GGC
          + GGT
          + GCA
          + GCG
          + GCC
          + GCT
          + GTA
          + GTG
          + GTC
          + GTT
          + CAA
          + CAG
          + CAC
          + CAT
          + CGA
          + CGG
          + CGC
          + CGT
          + CCA
          + CCG
          + CCC
          + CCT
          + CTA
          + CTG
          + CTC
          + CTT
          + TAA
          + TAG
          + TAC
          + TAT
          + TGA
          + TGG
          + TGC
          + TGT
          + TCA
          + TCG
          + TCC
          + TCT
          + TTA
          + TTG
          + TTC
          + TTT
      )
      % (10**9 + 7)
  )
  
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."}]