toInt :: (String -> Int)
toInt x = read x ::Int
computeDigit ::  Int -> Int
computeDigit a
  | a    <  10 = 1
  | a    <  100 = 2
  | a    <  1000 = 3
  | a    <  10000 = 4
  | a    <  100000 = 5

main = do
  args <- words <$> getLine
  print $ length $ filter (odd) $ map(computeDigit) [1..toInt((args !!) 0)]