#include const int mod = 1000000007; int tmp[2][10][10]; const int T[10][10] = { {1, 1, 1, 1, 1, 1, 1, 1, 0, 0}, {0, 1, 1, 1, 0, 0, 0, 1, 0, 1}, {0, 1, 1, 1, 1, 1, 0, 0, 0, 1}, {0, 1, 1, 1, 1, 1, 1, 0, 1, 1}, {0, 0, 1, 1, 1, 1, 0, 0, 0, 1}, {0, 0, 1, 1, 1, 1, 1, 0, 0, 1}, {0, 0, 0, 1, 0, 1, 1, 1, 0, 1}, {0, 0, 0, 1, 0, 0, 0, 1, 0, 0}, {0, 1, 0, 0, 0, 0, 1, 0, 1, 1}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 1}, }; const int TT[10][10] = { {0, 3, 4, 5, 3, 4, 3, 6, 0, 0}, {0, 2, 3, 4, 0, 0, 0, 5, 0, 1}, {0, 3, 2, 3, 3, 4, 0, 0, 0, 2}, {0, 4, 3, 2, 4, 3, 4, 0, 5, 3}, {0, 0, 3, 4, 2, 3, 0, 0, 0, 1}, {0, 0, 4, 3, 3, 2, 3, 0, 0, 2}, {0, 0, 0, 4, 0, 3, 2, 5, 0, 1}, {0, 0, 0, 3, 0, 0, 0, 4, 0, 0}, {0, 3, 0, 0, 0, 0, 3, 0, 4, 2}, {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, }; int Ti[1000001][10][10]; void mult(const int A[10][10], const int B[10][10], int C[10][10]){ int i, j, k; for(i=0;i<10;i++){ for(j=0;j<10;j++){ long long int tmp = 0; for(k=0;k<10;k++){ tmp = (tmp + (long long int) A[i][k] * B[k][j]) % mod; } C[i][j] = tmp; } } } int main(){ int i, j, ans; int n; scanf("%d", &n); for(i=0;i<10;i++){ for(j=0;j<10;j++){ Ti[0][i][j] = i == j; } } for(i=0;i= mod) ans -= mod; } printf("%d\n", ans); return 0; }