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.
z=[[1,9],[10,99],[100,999],[1000,9999],[10000,99999],[100000,999999],[1000000,9999999],[10000000,99999999],[100000000,999999999],[1000000000,9999999999]]
n=int(input())
c=0
for i in range(9,-1,-1):
    if(z[i][0]<n):
        c+=(n-z[i][0])*(i+1)+(i+1)
        for j in range(i-1,-1,-1):
            if(j==0):
                c+=9
            else:
                c+=(z[j][0]*10)*(j+1)
        break
print(c)