#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n;
  long long r1, sum;
  while (cin >> n) {
    if (n < 10)
      cout << n;
    else if (n < 100) {
      r1 = n - 9;
      r1 *= 2;
      sum = r1 + 9;
      cout << sum;
    } else if (n < 1000) {
      r1 = n - 99;
      r1 *= 3;
      sum = r1 + 189;
      cout << sum;
    } else if (n < 10000) {
      r1 = n - 999;
      r1 *= 4;
      sum = r1 + 2889;
      cout << sum;
    } else if (n < 100000) {
      r1 = n - 9999;
      r1 *= 5;
      sum = r1 + 38889;
      cout << sum;
    } else if (n < 1000000) {
      r1 = n - 99999;
      r1 *= 6;
      sum = r1 + 488889;
      cout << sum;
    } else if (n < 10000000) {
      r1 = n - 999999;
      r1 *= 7;
      sum = r1 + 5888889;
      cout << sum;
    } else if (n < 100000000) {
      r1 = n - 9999999;
      r1 *= 8;
      sum = r1 + 68888889;
      cout << sum;
    } else if (n < 1000000000) {
      r1 = n - 99999999;
      r1 *= 9;
      sum = r1 + 788888889;
      cout << sum;
    } else {
      sum = 8888888889;
      cout << sum + 10;
    }
    cout << endl;
  }
}
