import java.util.*

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val x = sc.nextInt()
    val dp = Array(1001) { Array(5001) {false} }
    dp[0][0] = true
    for (i in 0 until 1000) {
        for (j in 0 until 5000) {
            if (!dp[i][j]) {
                continue
            }
            dp[i + 1][j] = true
            dp[i + 1][j + 1] = true
            dp[i + 1][j + 2] = true
            dp[i + 1][j + 3] = true
            dp[i + 1][j + 4] = true
            dp[i + 1][j + 5] = true
        }
    }

    for (i in 1..1000) {
        if (i * 100 > x) {
            break
        }
        val rem = x - i * 100
        if (rem <= 5000 && dp[i][rem]) {
            println(1)
            return
        }
    }
    println(0)
}