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.
import math
from collections import Counter, defaultdict
from functools import lru_cache

t = 1
for _ in range(t):
    n = int(input())
    count = 1
    pow = 10
    ans = 0
    temp = n
    while n//10 > 0:
        ans += (pow-pow//10) * count
        ans += (count+1)
        pow *= 10
        count += 1
        n = n // 10
    rem = temp % 10
    # print(ans)
    #print(pow, count, rem)
    ans += (pow//10+rem - pow//10) * count
    print(ans)





