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