import java.io.{BufferedReader, InputStreamReader}

object Main {
  def main(args: Array[String]): Unit = {
    val in = new BufferedReader(new InputStreamReader(System.in))
    val n = in.readLine().toInt

    val d = n / 100
    val r = n % 100

    System.out.println(
      if (((r - 1) / 5 + 1) <= d) {
        1
      } else {
        0
      }
    )
  }
}
