#include <bits/stdc++.h>

#define int long long

using namespace std;

long long n, ans;

int judge(int x, int s) {
    if(x * s * 10 + x <= n) return 1;
    else return 0;
}

signed main() {

    scanf("%lld", &n);
    long long tmp = n, len = 0;
    while(tmp) len ++, tmp /= 10;
    for(int i = 2;i <= len; i += 2) {
        // cout << i << " " << len << "\n";
        if(len > i) ans += 9ll * pow(10, i / 2 - 1);
        else {
            int s = pow(10, i / 2 - 1), t = pow(10, i / 2) - 1;
            for(int j = s;j <= t; j++) { if(judge(j, s)) ans ++;}
        } 
        // cout << i << " " << ans << "\n";
    }
    printf("%lld", ans);

    return 0;
}

/*
1234122356

1000000000000
*/
#include <bits/stdc++.h>
#define forloop(i, begin, end) for (__typeof(end) i = (begin) - ((begin) > (end)); i != (end) - ((begin) > (end)); i += 1 - 2 * ((begin) > (end)))
#define ll long long int
#define ld long double
#define pb emplace_back
#define ravi ios_base::sync_with_stdio(false);
#define parmar2002 cin.tie(NULL); cout.tie(NULL);
#define nl "\n"
#define whole(x) x.begin(), x.end()
#define wholer(x) x.rbegin(), x.rend()
#define len(s) s.size()
#define endline cout << "\n";
#define v(arr, n) vector<ll> arr(n);
#define vin(arr, n) forloop(i, 0, n) cin >> arr[i];
#define T(T) ll tt; cin >> tt; forloop(T, 1, tt + 1)
using namespace std;
void factors(ll n)
{
    
}
void solve()
{
    double n;
    cin>>n;
    cout<<ceill(n/100)<<nl;
}
int main()
{
    ravi parmar2002
    // freopen("input.txt","r",stdin); freopen("output.txt","w",stdout);
    //clock_t tStart = clock();
    // T(T)
    solve();
    //printf("Time taken: %.2fs\n", (double)(clock() - tStart)/CLOCKS_PER_SEC);
    return 0;
}