function Main(input) {
    var C = 1e+9 + 7;
    var C2 = 1e+5;
    input = input.trim().split("\n").map(function(x) { return x.split(" ")});
    let N = parseInt(input[0][0], 10);
    let seven = 1;
    let eight = 2;
    let nine = 1;
    for (let i = 0; i < N; i++){
        seven = kakeruR(seven, 8, C, C2);
        eight = kakeruR(eight, 9, C, C2);
        nine = kakeruR(nine, 10, C, C2);
    }
    console.log(mod(nine + seven - eight, C));
}


function mod(i, j) {
    return (i % j) < 0 ? (i % j) + 0 + (j < 0 ? -j : j) : (i % j + 0);
}

function kakeruR(a, b, C, C2){
    var tmpQ, tmpR, ans;
    tmpQ = (Math.floor(b / C2));  // CAUTION!!
    tmpR = b - (tmpQ * C2);
    ans = (a * tmpQ % C) * C2 % C + (a * tmpR);
    ans %= C;
    return ans;
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"));
