fun main(args: Array<String>) {
  val X = readInt()
  val nMin = X / 105
  val nMax = X / 100
  for (n in nMin..nMax) {
    val xMin = n * 100
    val xMax = n * 105
    if (X in xMin..xMax) {
      println(1)
      return
    }
  }
  println(0)
}

fun readString() = readLine()!!
fun readStrings() = readString().split(' ')
fun readInt() = readString().toInt()
fun readInts() = readStrings().map { it.toInt() }

