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.
a=int(input())

resp=0
if a>999999999:
    resp+=(a-999999999)*10
    a=999999999
if a>99999999:
    resp+=(a-99999999)*9
    a=99999999
if a>9999999:
    resp+=(a-9999999)*8
    a=9999999
if a>999999:
    resp+=(a-999999)*7
    a=999999
if a>99999:
    resp+=(a-99999)*6
    a=99999
if a>9999:
    resp+=(a-9999)*5
    a=9999
if a>999:
    resp+=(a-999)*4
    a=999
if a>99:
    resp+=(a-99)*3
    a=99
if a>9:
    resp+=(a-9)*2
    a=9
if a<=9:
    resp+=a
print (resp)

	 		   	 			  	  							 	 				