#define _USE_MATH_DEFINES
#include <iostream>
#include <sstream>
#include <string>
#include <list>
#include <vector>
#include <queue>
#include <algorithm>
#include <climits>
#include <cstring>
#include <cmath>
#include <stack>
#include <iomanip>
#include <tuple>
#include <functional>
#include <cfloat>
#include <map>
#include <set>
#include <array>
#include <stdio.h>
#include <string.h>
#include <random>
using ll = long long;
using ull = unsigned long long;
using namespace std;
#define int long long
#define CONTAINS_VEC(v,n) (find((v).begin(), (v).end(), (n)) != (v).end())
#define SORT(v) sort((v).begin(), (v).end())
#define RSORT(v) sort((v).rbegin(), (v).rend())
#define ARY_SORT(a, size) sort((a), (a)+(size))
#define REMOVE(v,a) (v.erase(remove((v).begin(), (v).end(), (a)), (v).end()))
#define REVERSE(v) (reverse((v).begin(), (v).end()))
#define ARY_REVERSE(v,a) (reverse((v), (v)+(a)))
#define REP(i, n) for (int (i)=0; (i) < (n); (i)++)
#define REPE(i, n) for (int (i)=0; (i) <= (n); (i)++)
#define CONTAINS_MAP(m, a) (m).find((a)) != m.end()
#define CONTAINS_SET(m, a) (m).find((a)) != m.end()
void YesNo(bool b) { cout << (b ? "Yes" : "No") << endl; }
//void YESNO(bool b) { cout << (b ? "YES" : "NO") << endl; }
void Yes() { cout << "Yes" << endl; }
void No() { cout << "No" << endl; }




//---------- 1000000007 ----------
const int MOD = 1000000007;
int m_add(int a, int b)
{
	return (a + b) % MOD;
}
int m_sub(int a, int b)
{
	return (a + MOD - b) % MOD;
}
int m_mul(int a, int b)
{
	return (a * b) % MOD;
}
int m_pow(int x, int n)
{
	if (n == 0) return 1;
	ll res = m_pow((x * x) % MOD, n / 2);
	if (n & 1) res = (res * x) % MOD;
	return res;
}
int m_div(int a, int b)
{
	return m_mul(a, m_pow(b, MOD - 2));
}
int m_comb(int n, int r)
{
	int i;
	int p = 1;
	for (i = 1; i <= r; i++)
	{
		p = m_mul(p, (n - i + 1));
		p = m_div(p, i);
	}
	return p;
}
int m_comb_with_rep(int n, int r)
{
	return m_comb(n + r - 1, r);
}
int m_perm(int n, int r)
{
	int a = 1;
	for (int i = n; i > n - r; i--)
	{
		a = m_mul(a, i);
	}
	return a;
}


int comb[1000010];

int N;

void make_comb()
{
	int i;
	int p = 1;
	for (i = 1; i <= N; i++)
	{
		p = m_mul(p, (N - i + 1));
		p = m_div(p, i);
		comb[i] = p;
	}
}

signed main()
{
	cin >> N;

	make_comb();

	if (N == 1)
	{
		cout << 0 << endl;
		return 0;
	}

	int a = 1;
	for (int i = 0; i < N; i++)
	{
		a = m_mul(a, 10);
	}
	int b = 1;
	for (int i = 0; i < N; i++)
	{
		b = m_mul(b, 8);
	}

	int c = 0;
	int n = 1;
	for (int i = 1; i <= N; i++)
	{
		int co = comb[N - (i - 1)];
		int d = m_mul(co, n);
		c = m_add(c, d);

		n = m_mul(n, 8);
	}

	int ans = m_sub(a, b);
	ans = m_sub(ans, c);
	ans = m_sub(ans, c);

	cout << ans << endl;


	//int cnt = 0;
	//for (int i = 0; i <= 999; i++)
	//{
	//	int d0 = i % 10;
	//	int d1 = (i / 10) % 10;
	//	int d2 = (i / 100) % 10;
	//	bool flg = false;
	//	if (d0 == 0 || d1 == 0 || d2 == 0)
	//	{
	//		if (d0 == 9 || d1 == 9 || d2 == 9)
	//		{
	//			cnt++;
	//			flg = true;
	//			//cout << i << endl;
	//		}
	//	}
	//	if (!flg) cout << i << endl;
	//}
	//cout << cnt << endl;

	//int N;
	//cin >> N;

	//if (N == 1)
	//{
	//	cout << 0 << endl;
	//	return 0;
	//}

	//int p = m_perm(N, 2);
	//int d = 1;
	//for (int i = 0; i < N - 2; i++)
	//{
	//	d = m_mul(d, 10);
	//}
	//int ans = m_mul(p, d);
	//cout << ans << endl;
}




Measured memory_bytes: 11240