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)
else:
    count=0
    s=str(n)
    if len(s)==2:
        count+=9+(n-9)*2
    elif len(s)==3:
        count+=189+(n-99)*3
    elif len(s)==4:
        count+=2889+(n-999)*4
    elif len(s)==5:
        count+=38889+(n-9999)*5
    elif len(s)==6:
        count+=488889+(n-99999)*6
    elif len(s)==7:
        count+=5888889+(n-999999)*7
    elif len(s)==8:
        count+=68888889+(n-9999999)*8
    elif len(s)==9:
        count+=788888889+(n-99999999)*9
    elif len(s)==10:
        count+=8888888889+(n-999999999)*10
    print(count)
    
        
    
    
    
