#include using namespace std; typedef long long ll; typedef long double ld; #define rep(i, n) for (ll i = 0; i < n; i++) #define FOR(i, a, b) for (ll i = a; i < b; i++) #define len(v) ll(v.size()) #define fi first #define se second template void cout_vec(const vector &vec){ for(auto itr:vec) cout< P; const ll mod=1e9+7; ll dp[1000010][2][10]; int main(){ cin.tie(0); ios::sync_with_stdio(false); int n; cin>>n; string s; rep(i,n) s.push_back('9'); dp[0][0][0]=1; rep(i,n)rep(j,2)rep(k,10){ int x=s[i]-'0'; for(int l=k;l<=(j?9:x);l++){ (dp[i+1][j||(l