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