#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include //#include const double EPS = (1e-10); using namespace std; using Int = long long; //using namespace boost::multiprecision; const Int MOD = 1000000007; Int mod_pow(Int x, Int n) { Int res = 1; while(n > 0) { if(n & 1) res = (res * x) % MOD; //ビット演算(最下位ビットが1のとき) x = (x * x) % MOD; n >>= 1; //右シフト(n = n >> 1) } return res; } Int dp[1000000][10]; int main(){ Int N; cin >> N; dp[1][9] = 1; for (int i = 8; i >= 0; i--){ dp[1][i] = dp[1][i+1] + 1; } if (N == 1){ cout << 10 << endl; return 0; } for (int i = 2; i <= N-1; i++){ for (int j = 9; j >= 0; j--){ dp[i][j] += dp[i-1][j]; dp[i][j] %= MOD; } for (int j = 8; j >= 0; j--){ dp[i][j] += dp[i][j+1]; } } Int ans = 0; for (int i = 9; i > 0; i--){ ans += dp[N-1][i]; ans %= MOD; } for (int i = 1; i <= N-1; i++){ ans += dp[i][1]; ans %= MOD; } ans++; ans %= MOD; cout << ans << endl; }