#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long n;
  cin >> n;
  unsigned long long ans = 0;
  if (n == 1000000000) {
    ans += 10;
    n = 999999999;
  }
  if (n <= 999999999 && n > 99999999) {
    ans += (n - 99999999) * 9;
    n = 99999999;
  }
  if (n <= 99999999 && n > 9999999) {
    ans += (n - 9999999) * 8;
    n = 9999999;
  }
  if (n <= 9999999 && n > 999999) {
    ans += (n - 999999) * 7;
    n = 999999;
  }
  if (n <= 999999 && n > 99999) {
    ans += (n - 99999) * 6;
    n = 99999;
  }
  if (n <= 99999 && n > 9999) {
    ans += (n - 9999) * 5;
    n = 9999;
  }
  if (n <= 9999 && n > 999) {
    ans += (n - 999) * 4;
    n = 999;
  }
  if (n <= 999 && n > 99) {
    ans += (n - 99) * 3;
    n = 99;
  }
  if (n <= 99 && n > 9) {
    ans += (n - 9) * 2;
    n = 9;
  }
  if (n <= 9) {
    ans += n;
    n = 0;
  }
  cout << ans;
  return 0;
}
