import qualified Data.Vector.Unboxed as VU
import Control.Applicative

main :: IO ()
main = do
  n <- read <$> getLine :: IO Int
  print $ length $ takeWhile (<= n)
    $ do x <- iterate (*100) 1
         [x..x*10-1]