#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, counter = 0, count = 0;
  cin >> n;
  long long t = n;
  while (t) {
    t = t / 10;
    count++;
  };
  long long ans = count * (n + 1);
  for (long long i = 0; i < count; i++) counter += pow(10, i);
  ans = ans - counter;
  cout << ans;
  return 0;
}
