#include<bits/stdc++.h>
using namespace std;
using ll = long long;

int m = 1e9 + 7;
int main()
{
	int n; cin >> n;
	ll a = 1, b = 1, c = 1;
	for (int i = 0; i < n; ++i)
	{
		a = a * 10 % m;
		b = b * 9 % m;
		c = c * 8 % m;
	}
	cout << (a - 2*b + c + 2*m) % m << endl;
}
