Problem:
Score : 300 points

Problem Statement

How many integer sequences A_1,A_2,\ldots,A_N of length N satisfy all of the following conditions?

0 \leq A_i \leq 9

There exists some i such that A_i=0 holds.

There exists some i such that A_i=9 holds.

The answer can be very large, so output it modulo 10^9 + 7.

Constraints

1 \leq N \leq 10^6

N is an integer.

Input

Input is given from Standard Input in the following format:

N

Output

Print the answer modulo 10^9 + 7.

Sample Input 1

2

Sample Output 1

2

Two sequences \{0,9\} and \{9,0\} satisfy all conditions.

Sample Input 2

1

Sample Output 2

0

Sample Input 3

869121

Sample Output 3

2511445

Solution in C# (Mono-mcs 6.8.0.105) (judge verdict: Wrong Answer)

using System;
using System.Collections.Generic;
using System.Linq;
using System.Numerics;
using System.Text;
using System.Threading.Tasks;

namespace AtCoder178
{
    class Program
    {
        static int[] RI()
        {
            return Console.ReadLine().Split(' ').Select(a => int.Parse(a)).ToArray();
        }

        static long[] RL()
        {
            return Console.ReadLine().Split(' ').Select(a => long.Parse(a)).ToArray();
        }

        static string RS()
        {
            return Console.ReadLine();
        }

        static void W(object msg)
        {
            Console.WriteLine(msg);
        }

        static void Main(string[] args)
        {
            QC();
        }

        static void QA()
        {
            W("0".Equals(RS()) ? "1" : "0");
        }

        static void QB()
        {
            long[] num = RL();

            long ac = num[0] * num[2];
            long ad = num[0] * num[3];
            long bc = num[1] * num[2];
            long bd = num[1] * num[3];

            W(Math.Max(Math.Max(ac, ad), Math.Max(bc, bd)));
        }

        static void QC()
        {
            int N = int.Parse(RS());
            long modulus = 1000000007;

            BigInteger bi = new BigInteger(N);
            bi = BigInteger.ModPow(new BigInteger(10), bi, modulus);
            BigInteger bi2 = new BigInteger(N);
            bi2 = BigInteger.ModPow(new BigInteger(9), bi2, modulus);
            BigInteger bi3 = new BigInteger(N);
            bi3 = BigInteger.ModPow(new BigInteger(9), bi3, modulus);
            BigInteger bi4 = new BigInteger(N);
            bi4 = BigInteger.ModPow(new BigInteger(8), bi4, modulus);

            bi = BigInteger.Subtract(bi, bi2);
            bi = BigInteger.Subtract(bi, bi2);
            bi = BigInteger.Add(bi, bi4);
            bi = BigInteger.ModPow(bi, 1, modulus);

            W(bi.ToString());
        }

        static void QD()
        {

        }

        static void QE()
        {

        }
    }
}