#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x = 0, tot = 0, y = 0, z = 0, a = 0, b = 0, solution = 0;
  cin >> n;
  if (n > 0 && n < 10) {
    cout << n;
    return 0;
  } else if (n >= 10 && n < 100) {
    a = (n - 9) * 2;
    solution = a + 9;
    cout << solution;
    return 0;
  } else if (n >= 100 && n < 1000) {
    a = (n - 99) * 3;
    solution = a + 189;
    cout << solution;
    return 0;
  } else if (n >= 1000 && n < 10000) {
    a = (n - 999) * 4;
    solution = a + 2889;
    cout << solution;
    return 0;
  } else if (n >= 10000 && n < 100000) {
    a = (n - 9999) * 5;
    solution = a + 38889;
    cout << solution;
    return 0;
  } else if (n >= 100000 && n < 1000000) {
    a = (n - 99999) * 6;
    solution = a + 488889;
    cout << solution;
    return 0;
  } else if (n >= 1000000 && n < 10000000) {
    a = (n - 999999) * 7;
    solution = a + 5888889;
    cout << solution;
    return 0;
  } else if (n >= 10000000 && n < 100000000) {
    a = (n - 9999999) * 8;
    solution = a + 68888889;
    cout << solution;
    return 0;
  } else if (n >= 100000000 && n < 1000000000) {
    a = (n - 99999999) * 9;
    solution = a + 788888889;
    cout << solution;
    return 0;
  } else if (n >= 1000000000 && n < 10000000000) {
    a = (n - 999999999) * 10;
    solution = a + 8888888889;
    cout << solution;
    return 0;
  } else if (n >= 10000000000 && n < 100000000000) {
    a = (n - 9999999999) * 11;
    solution = a + 98888888889;
    cout << solution;
    return 0;
  } else if (n >= 100000000000 && n < 1000000000000) {
    a = (n - 99999999999) * 12;
    solution = a + 1088888888889;
    cout << solution;
    return 0;
  } else if (n >= 1000000000000 && n < 10000000000000) {
    a = (n - 999999999999) * 13;
    solution = a + 11888888888889;
    cout << solution;
    return 0;
  }
}
