#include <iostream>

using namespace std;
int main(){
	int i,n,ans = 0;
	cin >> n;
	for(i=1;i<=n;i++){
		int x = i,cnt = 0;
		while(x){
			cnt++;
			x /= 10;
		}
		if(cnt&1) ans++;
	}
	cout << ans << endl;
}