Public Class Program
  Shared Sub Main()
    Dim n As Long = Long.Parse(Console.ReadLine())
    Dim output As Long = 0
    For i As Long = 1 To n
      If i.ToString().Length() Mod 2 = 1 Then output += 1
    Next
    Console.WriteLine(output.ToString())
  End Sub
End Class