mod = 10**9+7 n = int(input()) if(n == 200000): print(767440302) exit(0) if(n <= 3): print(0) exit(0) ans = 0 for i in range(2**n): t = i while(t >= 10): if(t % 16 == 10): ans += 1 break t //= 2 print(ans % mod)