open Printf
open Scanf

let readint () = scanf " %d" (fun x -> x)

let () =
  let n = readint () in 
  List.init n (fun i -> i + 1) |> List.map string_of_int |> List.map String.length |> List.filter (fun x -> x mod 2 = 1) |> List.length
  |> printf "%d\n"
