#include<bits/stdc++.h>
using namespace std;
/* -------------------------------------------------TEMPLATE------------------------------------------------*/
# define C continue;
# define R return

#define int long long
# define D double
# define I insert
# define ull unsigned long long
# define ui unsigned int
#define ld long double

# define pb emplace_back
# define pf push_front

# define vi vector < int >
# define vc vector < char >
# define vs vector < string >
# define vb vector < bool >
# define vd vector < D >
# define vull vector < ull >
# define vld vector < ld >

# define vvi vector < vector < int > >
# define vvb vector < vector < bool > >
# define vvc vector < vector < char > >
# define vvs vector < vs >
# define vvd vector < vector < D > >
# define vvld vector < vector < ld > >

# define all(v) v.begin() , v.end()
# define allcomp(v) v.begin() , v.end() , comp

# define pii pair < int , int >
# define pld pair < ld , ld >
# define pDD pair < D , D >

# define vpld vector < pld >
# define vpii vector < pii >
# define vpDD vector < pDD >

# define vvpii vector < vector < pii > >
# define F first
# define S second
# define mp make_pair

#define PQ(type) priority_queue<type>
#define PQD(type) priority_queue<type, vector<type>, greater<type>>

#define mii map<int, int>
#define mci map<char, int>
#define msi map<string, int>
#define mis map<int, string>
#define mib map<int, bool>
#define mcb map<char,bool>

#define umii unordered_map<int, int>
#define umib unordered_map<int, bool>
#define umci unordered_map<char, int>
#define umsi unordered_map<string, int>
#define umis unordered_map<int, string>

#define init(arr,val) memset(arr,val,sizeof(arr))
#define REP(i,a,b) for(int i=a; i<b; i++)
#define distance(a,b,p,q) sqrt((p-a)*(p-a) + (q-b)*(q-b))

# define pp(n) printf("%.10Lf",n);
# define nl "\n"
# define fast ios_base::sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0);

string vow = "aeiou";
int month[] = { -1, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};

const int dxhorse[] = { -2, -2, -1, -1, 1, 1, 2, 2};
const int dyhorse[] = {1, -1, 2, -2, 2, -2, 1, -1};

const int dx4[] = { -1 , 0 , 1 , 0 } ;
const int dy4[] = { 0 , 1 , 0 , -1 } ;
const int dx8[] = { -1, -1, -1, 0, 0, 1, 1, 1 };
const int dy8[] = { -1, 0, 1, -1, 1, -1, 0, 1 };
const ld pie = 3.1415926535897932384626 ;
const int mod = 1e9 + 7 ;

# define fast ios_base::sync_with_stdio(false) ; cin.tie(0) ; cout.tie(0);
/// Tip : If a and b are positive integers ; we may say - ceil (a/b) = 1 + floor ( (a-1)/b )
/*------------------------------------ ------PRINT VECTOR----------------------------------------------------*/
template<typename T>
ostream& operator<<(ostream &stream, vector<T>& v)
{
    for (const auto &it : v)
        stream << it << " ";
    return stream;
}
/*------------------------------------------- INPUT IN VECTOR-----------------------------------------------*/
template<typename T>
istream& operator>>(istream &istream, vector<T>& v)
{
    for (auto &it : v)
        istream >> it;
    return istream;
}
/*----------------------------------------------------------------------------------------------------------*/
int fp(int a,int b, int m=mod)
{
    int res=1;
    while(b>0)
    {
        if(b&1) res=((res%m)*(a%m))%m;
        a=((a%m)*(a%m))%m;
        b=b>>1;
    }
    R res;
}
void solve()
{
   int n; cin>>n;
   //cout<<fp(10,n)<<nl<<fp(8,n)<<nl<<2*fp(9,n);
   int ans1=(fp(10,n)+fp(8,n))%mod;
   int ans2=(2*fp(9,n))%mod;
//    cout<<ans1<<nl<<ans2%mod;
   int ans=(ans1-ans2+mod)%mod;
   cout<<ans;
}

int32_t main()
{
// #ifndef ONLINE_JUDGE
//     freopen("input.txt", "r", stdin);
//     freopen("output.txt", "w", stdout);
// #endif
    fast
    int t = 1;
    //int t;  cin >> t;
    //cin>>ws;

    for (int i = 1; i <= t; i++) solve();

}


Measured memory_bytes: 3644