Hsara and Simone send each other messages that nobody else can read. This time Simone invented a sneaky cipher. To send Hsara a non-negative integer n, she encrypts it as follows.
Let d(n) be the decimal expansion of n. Write d(n) down n times in a row and call the resulting string x. The encryption of n is the length of x.
Take n=10. Then x=10101010101010101010, which has length 20, so the encryption of 10 is 20.
For n=0 the string x is empty, so the encryption of 0 is 0.
Hsara wrote a decryption program without any trouble. Can you?