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

const int N = 1e5 + 7;
int n, m, fa[N];

int main() {
    int x;
    cin >> x;
    for (int i = x + 1; ; i++) {
        if (i % 100 == 0) {
            cout << i - x << endl;
            return 0;
        }
    }
}
#include <bits/stdc++.h>
using namespace std;
#define rep(i,n) for(int i=0; i<(n); i++)
#define INF ((1LL<<62)-(1LL<<31))
typedef long long ll;

int main()
{
    ll n;
    cin >> n;
    string s=to_string(n);
    int x=s.size();
    int ans=0;
    if(x<=2) ans=n/11;
    else if(x==3) ans=9;
    else if(x<=4) ans=n/101;
    else if(x==5) ans=99;
    else if(x<=6) ans=n/1001;
    else if(x==7) ans=999;
    else if(x<=8) ans=n/10001;
    else if(x==9) ans=9999;
    else if(x<=10) ans=n/100001;
    else if(x==11) ans=99999;
    else if(x<=12) ans=n/1000001;
    cout << ans << endl;
    return 0;
}