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=input()
s=len(n)
if int(n)<=9:
    print(n)
else:
    b=0
    for i in range(s-1):
        t=[]
        t.append(9)
        u=[0]*i
        t=t+u
        listToStr = ''.join(map(str, t))
        t=int(listToStr)
        a=t*(i+1)
        b=a+b
    p1=[]
    p1.append(1)
    p2=[0]*(s-1)
    p1=p1+p2
    listToStr1 = ''.join(map(str, p1))
    p1=int(listToStr1)
    p=int(n)+1-p1
    q=p*s
    r=b+q
    print(r)