#include using namespace std; #define FOR(i,s,e) for(int (i)=(s);(i)<(int)(e);(i)++) #define REP(i,e) FOR(i,0,e) #define RFOR(i,e,s) for(int (i)=(e)-1;(i)>=(int)(s);(i)--) #define RREP(i,e) RFOR(i,0,e) #define all(o) (o).begin(), (o).end() #define psb(x) push_back(x) #define mp(x,y) make_pair((x),(y)) typedef long long ll; typedef pair PII; typedef priority_queue PQI; typedef priority_queue PQII; const double EPS = 1e-10; const ll mod = 1000000009; const int N = 200; const int M = N*10+1; int n; ll dp[N+10][2][M]; ll c[2][M]; void calc(string s, int idx) { n = (int)s.size(); memset(dp, 0, sizeof(dp)); dp[0][0][0] = 1; REP(i,n) REP(j,2) REP(k,M) { int lim = j ? 9 : s[i]-'0'; REP(d,lim+1) if (k+d> m >> d; calc(m, 0); calc(d, 1); ll res = 0; FOR(k,1,M) (res += (c[0][k]*c[1][k])%mod) %= mod; printf("%lld\n", res); return 0; }