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.
n=int(input())
if(n<10):
    print(n)
elif(n<100):
    sum1=9
    sum1+=(n-9)*2
    print(sum1)
elif(n<1000):
    sum1=9+90*2
    sum1+=(n-99)*3
    print(sum1)
elif(n<10000):
    sum1=9+90*2+900*3
    sum1+=(n-999)*4
    print(sum1)
elif(n<100000):
    sum1=9+90*2+900*3+9000*4
    sum1+=(n-9999)*5
    print(sum1)
elif(n<1000000):
    sum1=9+90*2+900*3+9000*4+90000*5
    sum1+=(n-99999)*6
    print(sum1)
elif(n<10000000):
    sum1=9+90*2+900*3+9000*4+90000*5+900000*6
    sum1+=(n-999999)*7
    print(sum1)
elif(n<100000000):
    sum1=9+90*2+900*3+9000*4+90000*5+900000*6+9000000*7
    sum1+=(n-9999999)*8
    print(sum1)
elif(n<1000000000):
    sum1=9+90*2+900*3+9000*4+90000*5+900000*6+9000000*7+90000000*8
    sum1+=(n-99999999)*9
    print(sum1)


    
    
    
    