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