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)
def int_map():
	return map(int, input().split())
def list_int():
	return list(map(int, input().split()))

n = int(input())
nn = n
terms = 0
while nn:
	nn//=10
	terms += 1

summ = 9*(2**(terms-1) - 1)

print(summ + (n - summ)*terms)









