//	auto a = readln.chomp.split(' ').map!(to!int).array;
import std.container;
import std.range;
import std.algorithm;
import std.array;
import std.string;
import std.conv;
import std.stdio;
import std.container;

long powmod(long x, long n, long mod) {
	x %= mod;

	long result = 1;
	while (n > 0) {
		if (n & 0x01L) {
			result = result * x % mod;
		}
		x = x * x % mod;

		n >>= 1;
	}

	return result;
}

// n == 1: 0, n == 2: 2, n == 3: 54, n == 4: 974, n == 5: 14670

void main() {
	enum long Mod = 10 ^^ 9 + 7;

	long n;
	readf("%s", &n);

	if (n <= 1) {
		writeln(0);
		return;
	}

	auto r = powmod(10, n, Mod) + powmod(8, n, Mod);
	r -= (powmod(9, n, Mod) * 2) % Mod;
	if (r < 0) {
		r += Mod;
	}

	writeln(r);
}
