#include <bits/stdc++.h>
#define rep(i,n) for (int i = 0; i< (n); i++)
using ll = long long;
using namespace std;

int main(void){
	ll d = 1e9+7;
	int N;
	cin >> N;
	ll a=1, b=2, c=1;
	rep(i,N) {
		a *= 10;
		b *= 9;
		c *= 8;
		a %= d;
		b %= d;
		c %= d;
	};

	ll ans = a - b +c;
	ans = (ans+d)%d;
	cout << ans << endl;
return 0;
}
