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())
# ans = 0
def count(n, sz):
  start = int('1' + '0'*(sz - 1))
  end = int('9'*sz)
  if(len(str
         (n)) < sz ):
    return 0
  if(len(str(n)) == sz):
    return n - start + 1
  return (end - start + 1)

n = int(input())

ans = 0
ans += count(n, 1)
ans += count(n, 2)*2
ans += count(n, 3)*3
ans += count(n, 4)*4
ans += count(n, 5)*5
ans += count(n, 6)*6
ans += count(n, 7)*7
ans += count(n, 8)*8
ans += count(n, 9)*9
ans += count(n, 10)*10

print(ans)

#Eesh's competive programmign book
#9 + 9 =10. This is the type of error that usally occurs. Please be on the look out. TLE. Time limit execced. This error occurs only if you can't code. MLE. Memory limit execced. This error happensif you want it to happen. Never in the history of competivive programming has a person every gotten this unintentionaly. 