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.

#biti = n%(pow(10, i+1)) // pow(10, i)
#lownum = n % (pow(10, i+1))

def solve():
	n = int(input())

	width = 0
	for width in range(10):
		if n // pow(10, width) == 0:
			break

	total = 0
	for i in range(width-1):
		delta = (i+1)*(pow(10, i+1)-pow(10, i))
		#print("i: %3d, delta: %d"%(i, delta))
		total += delta

	delta = width*(n - pow(10, width-1) + 1)
	#print("i: %3d, delta: %d"%(width-1, delta))
	total += delta

	print(total)

if __name__ == "__main__":
	solve()
