{"raw_statement":[{"iden":"statement","content":"Bob is creating an algorithm that can generate words. It works as follows:\n\nGiven an integer seed s:\n\nFor example, if s = 3705\n\nFrom B we can generate \"mico\" as follows: [13, 9, 3, 15 = [m, i, c, o]]\n\nFrom B we can also generate \"kecci\" as follows: [11, 5, 3, 3, 9 = [k, e, c, c, i]]\n\nPlease note that when doing the words-number trailing zeroes are not allowed. For example, 02 does not correspond to b.\n\nAlice thinks that Bob's model is very poor and that in fact, it can't generate words that belongs to any language. Bob is very confident about his model, that's why he wants to write a program that given s computes how many words can be generated. As Bob knows you are training to participate on the ACM - ICPC World Finals, he wants you to write a program that counts the possible words.\n\nThere will be multiple cases. Each line contains a positive integer s less than 106.\n\nFor each case output the number of valid words mod 109 + 7 on a single line.\n\n"},{"iden":"input","content":"There will be multiple cases. Each line contains a positive integer s less than 106."},{"iden":"output","content":"For each case output the number of valid words mod 109 + 7 on a single line."}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ s \\in \\mathbb{Z}^+ $ with $ s < 10^6 $.  \nLet $ \\Sigma = \\{1, 2, \\dots, 26\\} $ represent the alphabet (A=1, B=2, ..., Z=26).  \nA *valid word* is a sequence $ (d_1, d_2, \\dots, d_k) \\in \\Sigma^k $ for some $ k \\geq 1 $, such that:  \n$$\ns = \\sum_{i=1}^{k} d_i \\cdot 10^{k-i}\n$$  \n(i.e., $ s $ is the base-10 number formed by concatenating the digits $ d_1, d_2, \\dots, d_k $, with no leading zeros and each $ d_i \\in \\Sigma $).\n\n**Constraints**  \n1. $ 1 \\leq s < 10^6 $  \n2. Each digit $ d_i \\in \\{1, 2, \\dots, 26\\} $  \n3. No leading zero: $ d_1 \\geq 1 $ (automatically satisfied since $ d_i \\in \\Sigma $)  \n\n**Objective**  \nFor a given $ s $, count the number of sequences $ (d_1, \\dots, d_k) \\in \\Sigma^k $ such that the decimal concatenation of the digits equals $ s $.  \nOutput the count modulo $ 10^9 + 7 $.","simple_statement":"Given a positive integer s, count how many different words can be generated by converting s into a sequence of digits (each between 1 and 26), where each digit corresponds to a letter (1=A, 2=B, ..., 26=Z). Leading zeros are not allowed. Output the count modulo 10^9+7.","has_page_source":false}