#include <bits/stdc++.h>
using namespace std;
#define int long long int
#define mod 1000000007
int n;
int dp[1000001][2][2];
int solve(int in, int ze, int ni)
{
if (in == n)
{
if (ze && ni)
{
return 1;
}
return 0;
}
int ans = 0;
if (dp[in][ze][ni] != -1)
{
return dp[in][ze][ni];
}
for (int i = 0; i <= 9; i++)
{
ans = ans + solve(in + 1, ((i == 0) ? 1 : ze), ((i == 9) ? 1 : ni));
ans %= mod;
}
return dp[in][ze][ni] = ans;
}
int32_t main()
{
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int tc = 1;
while (tc--)
{
memset(dp, -1, sizeof(dp));
cin >> n;
cout << solve(0, 0, 0);
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CiNkZWZpbmUgaW50IGxvbmcgbG9uZyBpbnQKI2RlZmluZSBtb2QgMTAwMDAwMDAwNwppbnQgbjsKaW50IGRwWzEwMDAwMDFdWzJdWzJdOwppbnQgc29sdmUoaW50IGluLCBpbnQgemUsIGludCBuaSkKewoJaWYgKGluID09IG4pCgl7CgkJaWYgKHplICYmIG5pKQoJCXsKCQkJcmV0dXJuIDE7CgkJfQoJCXJldHVybiAwOwoJfQoJaW50IGFucyA9IDA7CglpZiAoZHBbaW5dW3plXVtuaV0gIT0gLTEpCgl7CgkJcmV0dXJuIGRwW2luXVt6ZV1bbmldOwoJfQoJZm9yIChpbnQgaSA9IDA7IGkgPD0gOTsgaSsrKQoJewoJCWFucyA9IGFucyArIHNvbHZlKGluICsgMSwgKChpID09IDApID8gMSA6IHplKSwgKChpID09IDkpID8gMSA6IG5pKSk7CgkJYW5zICU9IG1vZDsKCX0KCXJldHVybiBkcFtpbl1bemVdW25pXSA9IGFuczsKfQppbnQzMl90IG1haW4oKQp7Cglpb3NfYmFzZTo6c3luY193aXRoX3N0ZGlvKDApOwoJY2luLnRpZSgwKTsKCWNvdXQudGllKDApOwoJaW50IHRjID0gMTsKCXdoaWxlICh0Yy0tKQoJewoJCW1lbXNldChkcCwgLTEsIHNpemVvZihkcCkpOwoJCWNpbiA+PiBuOwoJCWNvdXQgPDwgc29sdmUoMCwgMCwgMCk7Cgl9CgoJcmV0dXJuIDA7Cn0=