N = int(input()) MOD = 10**9+7 inv = lambda x: pow(x, MOD-2, MOD) print((4*pow(10, N, MOD)-1)*inv(3)%MOD)