#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T GCD(T a, T b) {
  return b ? GCD(b, a % b) : a;
}
template <class T>
inline T LCM(T a, T b) {
  if (a < 0) return LCM(-a, b);
  if (b < 0) return LCM(a, -b);
  return a * (b / GCD(a, b));
}
int main() {
  string n;
  cin >> n;
  long long ans = 0;
  long long a[10];
  a[0] = 0;
  a[1] = 1;
  a[2] = 10;
  a[3] = 100;
  a[4] = 1000;
  a[5] = 10000;
  a[6] = 100000;
  a[7] = 1000000;
  a[8] = 10000000;
  a[9] = 100000000;
  int x = n.size();
  long long y = 0;
  for (int i = 1; i < x; i++) {
    ans = ans + i * 9 * a[i];
    y = y * 10;
    y = y + (int)(n[i - 1] - '0');
  }
  y = y * 10;
  y = y + (int)(n[x - 1] - '0');
  if (x == 10)
    ans = ans + 10;
  else
    ans = ans + x * (y - a[x] + 1);
  cout << ans << endl;
  return 0;
}
