/*
 Shahadat Hossain
 I.C.T Department
 Comilla University
 Session: 2013-2014
 */

#include<iostream>
#include<vector>
using namespace std;

int main(){
    int n;
    cin >> n;
    
    
    int res = 0;
    for(int i = 1; i <= n; i++){
        int m = i;
        int cnt = 0;
        while(m != 0){
            cnt++;
            m /= 10;
        }
        if(cnt % 2 == 1)
            res++;
    }
    cout << res << endl;
    
}
