object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val X = sc.nextInt()
  val count = X / 100 % 100
  val mod = X % 100
  val matched = for {
    a <- 0 to count if a * 5 <= mod
    b <- 0 to count - a if a * 5 + b * 4 <= mod
    c <- 0 to count - (a + b) if a * 5 + b * 4 + c * 3 <= mod
    d <- 0 to count - (a + b + c) if a * 5 + b * 4 + c * 3 + d * 2 <= mod
    e <- 0 to count - (a + b + c + d) if a * 5 + b * 4 + c * 3 + d * 2 + e * 1 <= mod
    f <- 0 to count - (a + b + c + d + e) if (a * 5 + b * 4 + c * 3 + d * 2 + e * 1 + f * 0) == mod
  } yield ()
  println(if (matched.isEmpty) 0 else 1)
}
