#include #include #include #include #include #include #include using namespace std; using ll = long long; constexpr int P = 1000000007; ll powmod(ll n, ll k) { ll r = 1, t = n % P; for (; k != 0; k /= 2) { if (k & 1) r = r * t % P; t = t * t % P; } return r; } ll inv(ll n) { return powmod(n, P - 2); } int main() { ll n; cin >> n; ll t = powmod(10, n); t = t * 4 % P; t = (t + P - 1) % P; t = t * inv(3) % P; cout << t << endl; return 0; }