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

    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)
}