object Main extends scala.App {
    import java.util
    import scala.collection._
    import scala.collection.mutable
    import scala.math._

    val sc = new java.util.Scanner(System.in)
    val eachItemMax = 1000000
    val x = sc.nextInt()

    if (x < 100) {
        println(0)
    } else {
        val dp = new Array[Int](x)
        def recursive(index: Int): Unit = {
            (100 to 105).foreach(t => {
                if (index - t >= 0 && dp(index - t) == 0) {
                    dp(index - t) = 1
                    recursive(index - t)
                }
            })
        }
        recursive(x)
        println(if (dp(0) == 1) 1 else 0)
    }
}