function Main(input) {
  input = input.split("\n");
  ans = 0;
  for(var i=1; i<=input; i++){
    if(i.toString().length%2 == 1){
      ans++;
    }
  }
  console.log(ans);
}
Main(require("fs").readFileSync("/dev/stdin", "utf8"));