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.
#!/usr/bin/python3
import math
from collections import defaultdict


class Logger:
    muted = False

    @staticmethod
    def log(*msg: str) -> None:
        if not Logger.muted:
            print("[", *msg, "]")

    def mute() -> None:
        Logger.muted = True

    def unmute() -> None:
        Logger.muted = False


def solve(n: int):
    if n < 10:
        print(n)
        return

    exponent = 2
    base = 10 ** exponent
    answer = 9  # without 0
    while n > base:
        # (base, base / 10]
        answer += (base - base // 10) * exponent
        exponent += 1
        base *= 10

    answer += (n - base // 10 + 1) * (exponent)
    if n == base:
        answer += 1
    print(answer)


def main():
    n = int(input())
    solve(n)


main()
