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.
"""
    Author : Ashish Sasmal
    Python3 / PyPy3
"""

from sys import stdin as sin
def aint():return int(input())
def amap():return map(int,sin.readline().split())
def alist():return list(map(int,sin.readline().split()))
def astr():return input()

n = aint()
s = str(n)
g = len(s)
ans = ((n%(10**(g-1)))+1 + (int(s[0])-1)*(10**(g-1)))*g
# print(ans)
g-=1
for i in range(g):
    ans+=(9*(10**i))*(i+1)
print(ans)