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/env python3
# -*- coding: utf-8 -*-
"""
Created on Wed Nov  7 21:08:45 2018

@author: supaul
"""

n=int(input())
if(n<10):
    print(n)
else:
    answer=0
    initial=10
    while(initial<n):
        if(initial==10):
            answer+=9
        else:
            answer+=(initial-(initial//10))*len(str(initial))
        initial=initial*10
   # print(answer)
   #if(n!=initial):
      # answer+=(n-(initial//10)+1)*len(str(initial//10))
    #else:
        #answer+=len(str(initial))
    #print(answer)
    if(n==initial):
        answer+=(n-(initial//10)+1)*len(str(initial//10))
        answer+=1
    else:
        answer+=(n-(initial//10)+1)*len(str(initial//10))
    print(answer)
        
        
        

    