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.
t=int(input())
if len(str(t))==1:
    print(t)
if len(str(t))==2:
    print(9+2*(t-9))
if len(str(t))==3:
    print(189+3*(t-99))
if len(str(t))==4:
    print(2889+4*(t-999))
if len(str(t))==5:
    print(2889+9000*4+5*(t-9999))
if len(str(t))==6:
    print(2889+9000*4+5*90000+6*(t-99999))
if len(str(t))==7:
    print(2889+9000*4+5*90000+6*900000+7*(t-999999))
if len(str(t))==8:
    print(2889+9000*4+5*90000+6*900000+7*9000000+8*(t-9999999))
if len(str(t))==9:
    print(2889+9000*4+5*90000+6*900000+7*9000000+8*90000000+9*(t-99999999))
if len(str(t))==10:
    print(2889+9000*4+5*90000+6*900000+7*9000000+8*90000000+9*900000000+10(t-999999999))