[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let n = read int
    List.filter (fun x -> (String.length (string x)) % 2 = 1) [1..n]
    |> List.length
    |> printfn "%i"
    0