var Main  = function(input){
    const [N] = input.trim().split(' ').map(x => BigInt(x));
    var count=BigInt(0);
    if (N>=2) count = 10n**N-7n**N % BigInt(10^9+7)
    console.log(count.toString(10));
};


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