#include <bits/stdc++.h>
using namespace std;

void siglo(int a)
{

	if (a <= 0)
		cout <<0;
	
	else if (a <= 100)
		cout <<1;
	
	else if (a % 100 == 0)
		cout << a/ 100 ;
	else
		cout << a/ 100 + 1 ;       
}

int main()
{
	int a =0;
	cin>>a;
	siglo(a);
	return 0;
}

#include <bits/stdc++.h>
#define ios ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
#define lli                                 long long int
#define int                                  long long
#define FOR(i,a,b)                          for(int i=a;i<b;i++)
#define pi                                  pair<int,int>
#define vi                                  vector<int>
#define vii                                 vector<pi>
#define all(a)                              a.begin(),a.end()
#define sz(a)                               (int)a.size()
#define pb                                  push_back
#define ppb                                 pop_back
#define pf                                  push_front
#define fr                                  first
#define sc                                  second
using namespace std;

template<typename T,typename T1>T amax(T &a,T1 b){if(b>a)a=b;return a;}
template<typename T,typename T1>T amin(T &a,T1 b){if(b<a)a=b;return a;}
// __builtin_popcountll(x);
// __builtin_clz(x) // Count Leading zeros
// __builtin_ctz(x) // Trailing zeros
const int MM = 998244353;
const int mod = 1e9 + 7;
const int INF = 1e15;
const int N = 5e6 + 4;
// vector<int>pref(N,0);
// vector<int>suff(N,0);

void solve()
{
    string s;
    cin >> s;
    int n = sz(s);
    int ans = 0;
    int num = stoll(s);
    if(num < 1000) {
        cout << 0 << "\n";
        return;
    }
    if(num <= 999999) {
        ans += num - 999;
    }
    else if(num > 999999 and num <= 999999999) {
        ans += 999999 - 999;
        ans += 2 * (num - 999999);
    }
    else if(num > 999999999 and num <= 999999999999) {
        ans += 999999 - 999;
        ans += 2 * (999999999 - 999999);
        ans += 3 * (num - 999999999);
    }
    else if(num > 999999999999 and num <= 999999999999999) {
        ans += 999999 - 999;
        ans += 2 * (999999999 - 999999);
        ans += 3 * (999999999999 - 999999999);
        ans += 4 * (num - 999999999999);
    }
    else {
        ans += 999999 - 999;
        ans += 2 * (999999999 - 999999);
        ans += 3 * (999999999999 - 999999999);
        ans += 4 * (999999999999999 - 999999999999);
        ans += 5 * (num - 999999999999999);
    }

    cout << ans;
}

signed main()
{
    ios;
    int t;
    t=1;
    // cin>>t;
    while(t--)
    {
        solve();
    }
}