object Main extends App {
    val x = io.StdIn.readInt

    /* TLE case
    var has = false
    for {
        ka <- 0 to x/100
        kb <- 0 to x/101
        kc <- 0 to x/102
        kd <- 0 to x/103
        ke <- 0 to x/104
        kf <- 0 to x/105
        
        if !has
    } if (100*ka+101*kb+102*kc+103*kd+104*ke+105*kf == x) has = true

    if (has) println(1)
    else println(0)
    */

    // val result = (1 to x).exists(c => 100*c <= x && x <= 105*c)
    val result = (1 to x).exists(c => (100*c to 105*c).contains(x))
    if (result) println(1)
    else println(0)
}