#include using namespace std; const int64_t m = 1000000007, o = (2 * m - 1) / 3; int64_t mul(int64_t a, int64_t b) { return a * b % m; } int64_t power(int64_t a, int64_t b) { if (b == 0) return 1; int64_t next = power(mul(a, a), b / 2); if (b % 2 == 1) { return mul(next, a); } else { return next; } } int main() { int64_t n; cin >> n; cout << (mul(m + 1 - o, power(10, n)) + o) % m << endl; }