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.
# coding=utf-8
a=int(input())
if a<=9:
    print(a)
elif a<=99:
    print(9+(a-9)*2)
elif a<=999:
    print(9+90*2+(a-99)*3)
elif a<=9999:
    print(9+90*2+900*3+(a-999)*4)
elif a<=99999:
    print(9+90*2+900*3+9000*4+(a-9999)*5)
elif a<=999999:
    print(9+90*2+900*3+9000*4+90000*5+(a-99999)*6)
elif a<=9999999:
    print(9+90*2+900*3+9000*4+90000*5+900000*6+(a-999999)*7)
elif a<=99999999:
    print(9+90*2+900*3+9000*4+90000*5+900000*6+9000000*7+(a-9999999)*8)
elif a<=999999999:
    print(9+90*2+900*3+9000*4+90000*5+900000*6+9000000*7+90000000*8+(a-99999999)*9)
elif a<=9999999999:
    print(9+90*2+900*3+9000*4+90000*5+900000*6+9000000*7+90000000*8+900000000*9+(a-999999999)*10)


	 	  	  			   	    	 	   			