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 = int(input())
a = 0

while n:

    if n > 0 and n <= 9:
        a += n
        n -= n
    
    if n >= 10 and n <= 99:
        k = (n // 10) * 2
        a += k * 2
        n -= k
    
    if n >= 100 and n <= 999:
        k = (n // 100) * 2
        a += k * 2
        n -= k
    
    if n >= 1000 and n <= 9999:
        k = (n // 1000) * 3
        a += k * 3
        n -= k
    
    if n >= 10000 and n <= 99999:
        k = (n // 10000) * 4
        a += k * 4
        n -= k
    
    if n >= 100000 and n <= 999999:
        k = (n // 100000) * 5
        a += k * 5
        n -= k
    
    if n >= 1000000 and n <= 9999999:
        k = (n // 1000000) * 6
        a += k * 6
        n -= k

    if n >= 10000000 and n <= 99999999:
        k = (n // 10000000) * 7
        a += k * 7
        n -= k

    if n >= 100000000 and n <= 999999999:
        k = (n // 100000000) * 8
        a += k * 8
        n -= k
    
    if n >= 1000000000 and n <= 9999999999:
        k = (n // 1000000000) * 9
        a += k * 9
        n -= k

print(a)