import sys





stdin = sys.stdin

def ns(): return stdin.readline().rstrip()

def ni(): return int(stdin.readline().rstrip())

def nm(): return list(map(int, stdin.readline().split()))

def nl(): return list(map(int, stdin.readline().split()))





def main():

    n = ni()

    mod = 10 ** 9 + 7

    print(((pow(10, n) % mod - (2 * pow(9, n)) % mod + pow(8, n) % mod) % mod))





if __name__ == '__main__':

    main()

import sys





stdin = sys.stdin

def ns(): return stdin.readline().rstrip()

def ni(): return int(stdin.readline().rstrip())

def nm(): return list(map(int, stdin.readline().split()))

def nl(): return list(map(int, stdin.readline().split()))





def main():

    n = ni()

    mod = 10 ** 9 + 7

    print(((pow(10, n, mod) - (2 * pow(9, n, mod)) + pow(8, n, mod)) % mod))





if __name__ == '__main__':

    main()

import sys

stdin = sys.stdin


def ns():
    return stdin.readline().rstrip()


def ni():
    return int(stdin.readline().rstrip())


def nm():
    return list(map(int, stdin.readline().split()))


def nl():
    return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    mod = 10**9 + 7
    print(((pow(10, n) % mod - (2 * pow(9, n)) % mod + pow(8, n) % mod) % mod))


if __name__ == "__main__":
    main()

import sys

stdin = sys.stdin


def ns():
    return stdin.readline().rstrip()


def ni():
    return int(stdin.readline().rstrip())


def nm():
    return list(map(int, stdin.readline().split()))


def nl():
    return list(map(int, stdin.readline().split()))


def main():
    n = ni()
    mod = 10**9 + 7
    print(((pow(10, n, mod) - (2 * pow(9, n, mod)) + pow(8, n, mod)) % mod))


if __name__ == "__main__":
    main()

-    print(((pow(10, n) % mod - (2 * pow(9, n)) % mod + pow(8, n) % mod) % mod)) +    print(((pow(10, n, mod) - (2 * pow(9, n, mod)) + pow(8, n, mod)) % mod))