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.
w=int(input())
if w<10:
     print(w)
elif w<100:
     print(9+(w-9)*2)
elif w<1000:
     print(90*2+9+(w-99)*3)
elif w<10000:
     print(900*3+90*2+9+(w-999)*4)
elif w<100000:
     print(9000*4+900*3+90*2+9+(w-9999)*5)
elif w<1000000:
     print(90000*5+9000*4+900*3+90*2+9+(w-99999)*6)
elif w<10000000:
     print(900000*6+90000*5+9000*4+900*3+90*2+9+(w-999999)*7)
elif w<100000000:
     print(9000000*7+900000*6+90000*5+9000*4+900*3+90*2+9+(w-9999999)*8)
elif w<1000000000:
     print(90000000*8+9000000*7+900000*6+90000*5+9000*4+900*3+90*2+9+(w-99999999)*9)