#include <bits/stdc++.h>
using namespace std;
long long n;
long long bank;
long long cnt, cnt2;
long long m;
int main() {
  cin >> n;
  m = n;
  cnt = 0;
  while (n > 0) {
    n = n / 10;
    cnt++;
  }
  cnt2 = cnt;
  long long superbank = 1;
  for (int i = 1; i < cnt; i++) {
    superbank *= 10;
  }
  for (int i = 1; i <= cnt; i++) {
    bank = ((m - superbank + 1) * cnt2) + bank;
    m = superbank - 1;
    superbank /= 10;
    cnt2--;
  }
  cout << bank;
  return 0;
}
