#include <iostream>

using namespace std;

int main()
{
    const long m = 1000000000 + 7;
    int N;
    cin >> N;
    long long 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) % m + m)%m;

    return 0;
}