#include <bits/stdc++.h>
using namespace std;
const int N = 1e5;
vector<pair<long long, long long> > v;
bool prime[N + 1];
void pre() {
  memset(prime, true, sizeof(prime));
  prime[0] = prime[1] = 0;
  for (int p = 2; p * p <= N; p++) {
    if (prime[p] == true) {
      for (int i = p * 2; i <= N; i += p) prime[i] = false;
    }
  }
}
long long a[N];
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long n, m, x, y, z, p, k, l, ans = 0, cnt = 0, sum = 0, d, i, maxi = -1,
                                    j;
  cin >> n;
  if (n < 10)
    cout << (n + 1) - 1;
  else if (n < 100)
    cout << 2 * (n + 1) - 11;
  else if (n < 1000)
    cout << 3 * (n + 1) - 111;
  else if (n < 10000)
    cout << 4 * (n + 1) - 1111;
  else if (n < 100000)
    cout << 5 * (n + 1) - 11111;
  else if (n < 1000000)
    cout << 6 * (n + 1) - 111111;
  else if (n < 10000000)
    cout << 7 * (n + 1) - 1111111;
  else if (n < 100000000)
    cout << 8 * (n + 1) - 11111111;
  else if (n < 1000000000)
    cout << 9 * (n + 1) - 111111111;
  else
    cout << 10 * (n + 1) - 1111111111;
  return 0;
}
