#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
#include <cstring>
#include <deque>
#include <time.h>
#include <stack>
#include <stdio.h>
#include <map>
#include <set>
#include <string>
#include <fstream>
#include <queue>
#define mp make_pair
#define pb push_back
#define PI 3.14159265358979323846
#define MOD 1000000007
#define INF ((ll)1e+15)
#define x1 fldgjdflgjhrthrl
#define x2 fldgjdflgrtyrtyjl
#define y1 fldggfhfghjdflgjl
#define y2 ffgfldgjdflgjl
typedef long long ll;
using namespace std;
ll i,n,x,m,k,ans;
int main()
{
cin >> n;
x = n;
while (x)
{
x /= 10;
m++;
}
ans = n*m + m - 1;
k = 1;
for (i = 0; i < m-1; i++)
{
k *= 10;
ans -=k;
}
cout << ans << endl;
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CiNpbmNsdWRlIDxhbGdvcml0aG0+CiNpbmNsdWRlIDx2ZWN0b3I+CiNpbmNsdWRlIDxjc3RyaW5nPgojaW5jbHVkZSA8ZGVxdWU+CiNpbmNsdWRlIDx0aW1lLmg+CiNpbmNsdWRlIDxzdGFjaz4KI2luY2x1ZGUgPHN0ZGlvLmg+CiNpbmNsdWRlIDxtYXA+CiNpbmNsdWRlIDxzZXQ+CiNpbmNsdWRlIDxzdHJpbmc+CiNpbmNsdWRlIDxmc3RyZWFtPgojaW5jbHVkZSA8cXVldWU+CiNkZWZpbmUgbXAgbWFrZV9wYWlyCiNkZWZpbmUgcGIgcHVzaF9iYWNrCiNkZWZpbmUgUEkgMy4xNDE1OTI2NTM1ODk3OTMyMzg0NgojZGVmaW5lIE1PRCAxMDAwMDAwMDA3CiNkZWZpbmUgSU5GICgobGwpMWUrMTUpCiNkZWZpbmUgeDEgZmxkZ2pkZmxnamhydGhybAojZGVmaW5lIHgyIGZsZGdqZGZsZ3J0eXJ0eWpsCiNkZWZpbmUgeTEgZmxkZ2dmaGZnaGpkZmxnamwKI2RlZmluZSB5MiBmZmdmbGRnamRmbGdqbAp0eX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