mod = 1000000007 eps = 10**-9 def main(): import sys input = sys.stdin.readline N = int(input()) dp = [0] * 16 dp[0] = 1 for _ in range(N): dp_new = [0] * 16 for state in range(16): state_new0 = (state << 1) % 16 state_new1 = state_new0 + 1 if state_new0 != 10: dp_new[state_new0] = (dp_new[state_new0] + dp[state])%mod dp_new[state_new1] = (dp_new[state_new1] + dp[state]) % mod dp = dp_new print((pow(2, N, mod) - (sum(dp) % mod))%mod) if __name__ == '__main__': main()