#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a;
  cin >> n;
  if (n < 10)
    a = 1 * (n + 1) - 1;
  else if (n < 100)
    a = a = 2 * (n + 1) - 11;
  else if (n < 1000)
    a = 3 * (n + 1) - 111;
  else if (n < 10000)
    a = 4 * (n + 1) - 1111;
  else if (n < 100000)
    a = 5 * (n + 1) - 11111;
  else if (n < 1000000)
    a = 6 * (n + 1) - 111111;
  else if (n < 10000000)
    a = 7 * (n + 1) - 1111111;
  else if (n < 100000000)
    a = 8 * (n + 1) - 11111111;
  else if (n < 1000000000)
    a = 9 * (n + 1) - 111111111;
  else if (n < 1000000000)
    a = 10 * (n + 1) - 1111111111;
  else if (n == 1000000000)
    a = 8888888899;
  cout << a << endl;
}
