const Main = input => {
  const cnt = Array(parseInt(input.split('\n')[0].trim(), 10))
    .fill(0)
    .filter((_, i) => (i + 1).toString().length % 2 === 1)
    .length

  console.log(cnt)
}

Main(require("fs").readFileSync("/dev/stdin", "utf8"))