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.
n = (input())
l = len(n)
count = 9
num = int(n)
if num <= 9:
    print(num)
elif 9<num <= 99:
    d = num - 9
    d *= 2
    print(9 + d)
elif 99<num<=999:
    d = num - 99
    d *= 3
    print(9 + 90*2 + d)
elif 999<num<=9999:
    d = num - 999
    d *= 4
    print(9 + 90*2 + 900*3 +d)
elif 9999< num <=99999:
    d = num - 9999
    d *= 5
    print(9 + 90*2 +900*3+9000*4+d)
elif 99999<num<=999999:
    d = num-99999
    d *= 6
    print(9 + 90*2+900*3+9000*4+90000*5+d)
elif 999999<num<=9999999:
    d = num-999999
    d *= 7
    print(9 + 90*2 + 900*3 +9000*4+90000*5+900000*6+d)
elif 9999999<num<=99999999:
    d = num - 9999999
    d *= 8
    print(9 + 90 *2 +900 *3+9000*4 +90000*5+900000*6 +9000000*7+d)
elif 99999999<num<=999999999:
    d = num -99999999
    d *= 9
    print(9 + 90 *2 +900 *3+9000*4 +90000*5+900000*6 +9000000*7+90000000*8 + d)