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.
from sys import stdin ,stdout 
input=stdin.readline
def print(*args, end='\n', sep=' ') -> None:
    stdout.write(sep.join(map(str, args)) + end)

n=int(input()) ; lenth=len(str(n)) ; ans=0
for i in range(lenth):
    if i!=lenth-1:    
        a="9"*(i+1)
    else:
        a=n
    x="9"*i
    if x=="":
        x=0
    ans+=(int(a)-int(x))*(i+1)
print(ans)