main :: IO()
main = do
  [n] <- map read . words <$> getLine
  print $ slv [1..n] 0
 
slv :: [Integer] -> Integer -> Integer
slv [] cnt = cnt
slv (n:ns) cnt | (10^0 <= n && n < 10^1) || (10^2 <= n && n < 10^3) || (10^4 <= n && n < 10^5) = slv ns (cnt + 1)
               | otherwise = slv ns cnt