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 math import ceil
from math import floor	
	
def mod_expo(n, p, m):
	"""find (n^p)%m"""
	result = 1
	while p != 0:
		if p%2 == 1:
			result = (result * n)%m
		p //= 2
		n = (n * n)%m
	return result
	
def find_least_diff(n):
	A = 2*(pow(2, n/2-1) - 1) 
	B = -pow(2, n/2)
	return int(abs(B - A))
	
def find_ways(n):
	return((n-1)//2)

		
def count_digits(n):
	m = 9
	count=n
	while True:
		if n >= m:
			count += n-m
		else:
			break
		m = str(m)
		m += "9"
		m = int(m)
	return count
	
def min_string(n, k, text):
	text = sorted(text)
	# text.sort()
	if text[0] == text[k-1]:
		print(''.join(text[i] for i in range(k-1, n)))
	else:
		print(text[k-1])
		
def get_board(n, m, mat):
	for i in range(n):
		for j in range(m):
	
			print(i, j)
			if mat[i][j] == '.':
				if (j > 0 and mat[i][j-1] != 'B') and (i > 0 and mat[i-1][j] != 'B'):
					mat[i][j] = 'B'
				else:
					mat[i][j] = 'W'
	for i in range(n):
		for j in range(m):
			print(mat[i][j])
			
t=1
# t=int(input())
while t:
	t = t - 1
	count=0
	# n, ox, oy = map(int, input().split())
	px = []
	py = []
	# n, m = map(int, input().split())
	# text = input()
	n = int(input())
	# l = list(map(int, input().strip().split()))[:n]
	print(count_digits(n))



	
