fun main(args: Array<String>) {
    val (X) = readLine()!!.split(' ').map(String::toInt)
    val dp = Array(200000) { false }
    dp[0] = true
    for (i in 0..X) {
        if (dp[i]) {
            for (j in 0..5) {
                dp[i + 100 + j] = true
            }
        }
    }
    println(if(dp[X]) 1 else 0)
}