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