Vanya got an important task — he should enumerate books in the library and label each book with its number. Each of the *n* books should be assigned with a number from 1 to *n*. Naturally, distinct books should be assigned distinct numbers.

Vanya wants to know how many digits he will have to write down as he labels the books.
The first line contains integer *n* (1 ≤ *n* ≤ 10<sup class="upper-index">9</sup>) — the number of books in the library.
'''

                            Online Python Compiler.
                Code, Compile, Run and Debug python program online.
Write your code in this editor and press "Run" button to execute it.

'''

n=int(input())
k=9 
c=1
sm=0
while(n>k):
    n=n-k 
    sm+=(k*c)
    l=len(str(k))
    s=int('9'*(l+1))
    k=s-k
    c+=1
sm+=(n*c)    
print(sm)    
    
    

