import Data.List
import Data.Char
import Data.Maybe
import qualified Data.ByteString.Char8 as BS8

dig_impl 0 r = r
dig_impl n r = dig_impl (div n 10) (r + 1)
dig n = dig_impl n 0

main :: IO ()
main = do
    n <- fst . fromJust . BS8.readInteger <$> BS8.getLine

    print $ length [x | x <- [1..n], (dig x) `mod` 2 == 1]
