// yukicoder: No.741 AscNumber(Easy) // 2019.5.12 bal4u #include typedef long long ll; #define M 1000000007 #define MAX 1000020 #define P9 362880 // 9! int tbl[101] = { 1,531950728,368774859,548996970,422550956,737935835,309944332,296716438,65533322,851076783,457992974, 559938709,118586228,177829816,830760447,240586351,611862881,267145356,334356152,706226766,107146451, 469491375,469619345,630906046,658967159,50180518,287209856,372045574,702584502,210306242,373281933, 330131954,179035946,642845435,293008185,889591949,832275593,783222990,698245208,968856847,559805077, 612250579,425371772,408721018,227278675,231684727,711739673,93615261,795156156,111810641,154425679, 950741508,384634755,797824545,581839401,899281002,343434222,924042332,973241307,253333132,679209364, 663967499,840761205,567656070,152546903,44613330,82447511,402958911,571952764,757842436,526226141, 184978106,402043945,99111089,19484938,419049924,253026585,713158286,874682245,220437571,644158465, 63869907,114643102,972816308,728256514,963945752,933338751,18380550,857887831,720850066,730342129, 178869710,711198175,194146825,768522507,643362481,281968565,947088120,949574384,121835953,641102369}; int ex_gcd(int a, int b, int *x, int *y) { int d; if (b == 0) { *x = 1; *y = 0; return a; } d = ex_gcd(b, a % b, y, x); *y -= a / b * (*x); return d; } int inverse(int a) { int x, y; ex_gcd(a, M, &x, &y); if (x < 0) x += M; return x; } int pn, pn9; // n!, (n+9)! void calc(int n) { int i; pn = tbl[n/10000]; for (i = n/10000*10000+1; i <= n; i++) pn = (ll)pn * i % M; pn9 = pn, n += 9; for ( ; i <= n; i++) pn9 = (ll)pn9 * i % M; } int main() { int i, N; scanf("%d", &N); calc(N); printf("%d\n", (int)((ll)pn9 * inverse((int)((ll)pn * P9 % M)) % M)); return 0; }