#include #include #include #include #include using namespace std; #define REP(i, n) for (int i = 0; i < (n); ++i) #define P(x) cout << (x) << "\n" #define D(x) cerr << (x) << "\n" #define fcout cout << fixed << setprecision(18) using i64 = long long int; // 10^18 static const i64 MOD = 1000000007; i64 modpow(i64 base, i64 power, i64 mod) { i64 res = 1; if(power==0) res = 1; else if(power%2==0)res = ((modpow(base, power/2, mod)%mod)*(modpow(base, power/2, mod)%mod))%mod; else if(power%2==1)res = (base*modpow(base, power/2, mod))%mod; return res; } i64 moddiv(i64 a, i64 b, i64 mod) { i64 s = mod,t = b,u=1,v=0; while(s) { i64 e = t/s; swap(t-=e*s, s); swap(u-=e*v, v); } if(u<0)u+=mod; return a*u % mod; } i64 moden(i64 x) { return moddiv(4 * pow(10, x) - 1, 3, MOD); } int main() { ios::sync_with_stdio(false); cin.tie(0); i64 n;cin>>n; P(moden(n)); return 0; }