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())
pre=[]
arr=[]
index=[]
y=0
for i in range(12):
    x=9*pow(10,i)
    y=y+x
    pre.append(y)
    #print(i,y)


for i in range(12):
    x=9*pow(10,i)*(i+1)
    arr.append(x)

for i in range(12):
    index.append(i+1)

dup=n
dig=0
while(dup>0):
    rem=dup%10
    dig=dig+1
    dup=dup//10

#print(dig)
if(dig==1):
    fin=n
    print(fin)
else:
    fin=n-pre[dig-2]
    f=fin*dig
    for i in range(0,dig-1):
        f=f+arr[i]
    print(f)
        

        
        



