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.
def solve():
    s = input()
    n = int(s)
    if n < 10:
        print(n)
        return
    num_digits = len(s)

    sum = 0
    power10 = 1
    num = 1
    for i in range(1, num_digits):
        sum+=num * power10
        power10*=10
        num+=1

    sum = sum * 9
    #print(sum)

    lower9_str = "9"*(num_digits - 1)
    lower9 = int(lower9_str)
    num_of_other_numbers = n - lower9
    num_of_other_digits = num_of_other_numbers * num_digits
    #print(num_of_other_digits)
    sum = sum + num_of_other_digits
    print(sum)


solve()