#include <bits/stdc++.h>
#define M 1000000007ll
using namespace std;
typedef long long ll;

ll fe(ll a, ll b) {
	if (b == 0) return 1;
	ll h = fe(a, b/2);
	if (b%2 == 0) return h*h%M;
	else return (h*h%M)*a%M;
}

int main() {
	int x; cin>>x;
	cout<<(fe(10,x) + fe(8,x) - 2*fe(9,x) + 2*M)%M<<endl;
}