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.
num = int(input())

def digits(n):
  counter = 0
  if 1 <= n <= 9:
    counter += n
  elif 10 <= n <= 99:
    counter += n + (n-9)
  elif 100 <= n <= 999:
    counter += n + 2*(n-99) +90
  elif 1000 <= n <=9999:
    counter += n + 3*(n-999) + 900*2 +90
  elif 10000 <= n <=99999:
    counter += n + 4*(n-9999) + 9000*3 +90+900*2
  elif 100000 <= n <= 999999:
    counter += n + 5*(n-99999) + 90000*4 + 9000*3 +90+900*2
  elif 10**6 <= n <= 9999999:
    counter += n + 6*(n-999999) + 900000*5 + 90000*4 + 9000*3 +90+900*2
  elif 10**7 <= n <= 99999999:
    counter += n + 7*(n-9999999) +9000000*6+ 900000*5 + 90000*4 + 9000*3 +90+900*2
  elif 10**8 <= n <= 999999999:
    counter += n + 8*(n-99999999)+ 90000000*7+9000000*6+ 900000*5 + 90000*4 + 9000*3 +90+900*2
  elif n==10**9:
    counter += n + 8*(n-99999999)+ 90000000*7+9000000*6+ 900000*5 + 90000*4 + 9000*3 +90+900*2 +1
  return counter

print(digits(num))