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.
def editor():
	import sys
	sys.stdin=open("input.txt",'r')
	sys.stdout=open("output.txt",'w')

def solve():
	N=input()
	if(len(N)==1):
		print(N)
		return

	n=int(N)
	ans=0
	for i in range(len(N)-1):
		ans+= (i+1)*9*(10**i)

	tem= n-(10**(len(N)-1))
	ans+= (tem+1)*len(N) # *(len(N)+1)
	print(ans)

if __name__ == "__main__":
	# editor()
	solve()