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.
digits= 0
count = 0
x = 10
n = int(input())

temp = n

while(temp > 0):
	digits += temp%10
	temp = temp//10

nines = 0
if(n > 9):
	count += 9
	nines = 2
else:
	print(n)

if(n>9):
	while(n>int('9'*nines)):
		count += 10**nines
		nines+=1
if(n > 9):
	a = 10**(nines-1)
	b = n - a
	count += nines*(b+1)
	print(count)