import qualified Data.Text as T
import qualified Data.Text.IO as T
import qualified Data.Text.Read as T

main :: IO ()
main = do
  (x : _) <- map unsafeSignedDecimal . T.words <$> T.getLine :: IO [Int]
  let
    n :: Int
    n | 2000 <= x = 1
      | x `elem` concatMap f [1..19] = 1
      | otherwise = 0
      where
        f :: Int -> [Int]
        f i = [(i * 100)..(i * 105)]
  print n

unsafeSignedDecimal :: T.Text -> Int
unsafeSignedDecimal s = case T.signed T.decimal s of
  Right (n, _) -> n
