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 *
from math import ceil
input = lambda:stdin.readline()

int_arr = lambda : list(map(int,stdin.readline().strip().split()))
str_arr = lambda :list(map(str,stdin.readline().split()))
get_str = lambda : map(str,stdin.readline().strip().split())
get_int = lambda: map(int,stdin.readline().strip().split())
get_float = lambda : map(float,stdin.readline().strip().split())


mod = 1000000007
setrecursionlimit(1000)

n = int(input())
val = len(str(n))-1

tot = 0
digits = 1
digit = 1
prev = 9
if val >= 1:
    while val:
        prev = (prev * 10) + 9
        tot += (9 * digits) * digit
        val -= 1
        digits *= 10
        digit += 1
    prev = prev // 10
    rem = n - prev
    tot += rem * (digit)
else:
    tot = n
print(tot) 




