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()
    x = len(s)
    y = int(s)
    if x == 1:
        print(s)
        return
    elif x == 2:
        z = (y-9)*x + 9
    elif x == 3:
        z = (y-99)*x + 180 + 9
    elif x == 4:
        z = (y-999)*x+ 9000*3 + 180 + 9
    elif x == 5:
        z = (y-9999)*x + 90000*4 + 9000*3 + 180 + 9
    elif x == 6:
        z = (y-99999)*x + 900000*5 +90000*4 + 9000*3 + 180 + 9
    elif x == 7:
        z = (y-9999999)*x + 9000000*6 + 900000*5 + 90000*4 + 9000*3 + 180 + 9
    elif x == 8:
        z = (y-9999999)*x + 90000000*7 + 9000000*6 + 900000*5 + 90000*4 + 9000*3 + 180 + 9
    elif x == 9:
        z = (y-99999999)*x + 900000000*8 + 90000000*7 + 9000000*6 + 900000*5 + 90000*4 + 9000*3 + 180 + 9
    elif x == 10:
        z = (y-999999999)*x + 9000000000*9 + 900000000*8 + 90000000*7 +9000000*6 + 900000*5 + 90000*4 + 9000*3 + 180 + 9
    print(z)
    return
try:
    solve()
except:
    pass