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.
#include<bits/stdc++.h>
using namespace std;
int n,ans;
int ws(int n){
	for(int i=1,j=0;i<=1e9;i*=10,j++){
		if(n<=i){
			return j;
		}
	}
}
int int_pow(int k,int b){
	int sum=1;
	for(int i=1;i<=b;i++){
		sum*=k;
	}
	return sum;
}
int main(){
	cin>>n;
	int w=ws(n);
//	cout<<w<<endl;
	for(int i=1;i<w;i++){
		ans+=i*9;
	}
	ans+=w*(n-int_pow(10,w-1)+1);
	cout<<ans;
	return 0;
}