#include <bits/stdc++.h>   const double PI =       3.141592653589793238462643383279502884197169399375105820974944;   using namespace std;   long long arr[] = {0,     9,      90,      900,      9000,                      90000, 900000, 9000000, 90000000, 900000000};   long long arr1[] = {0,     9,      99,      999,      9999,                       99999, 999999, 9999999, 99999999, 999999999};   void solve() {     long long n;     cin >> n;     int digits = 0;     long long temp = n;     while (temp != 0) {       ++digits;       temp = temp / 10;     }     long long ans = 0;     for (long long i = 0; i < digits; ++i) {       ans += arr[i] * (i);     }     ans += (n - arr1[digits - 1]) * (digits);     cout << ans <<   n ;   }   int main() {     bool testing = false;     ios::sync_with_stdio(0);     cin.tie(0);     cout.tie(0);     if (testing) {       freopen( test.txt ,  rt , stdin);       int start = clock();       solve();       int end = clock();       cout <<  time:   << (end - start) / (double)(CLOCKS_PER_SEC)*1000            <<   milliseconds n ;     } else {       solve();     }   }   