[<AutoOpen>]
module Program

open System

let read f = stdin.ReadLine() |> f
let reada f = stdin.ReadLine().Split() |> Array.map f
let reads f = stdin.ReadLine().Split() |> Array.toList |> List.map f

[<EntryPoint>]
let main _ =
    let X = read int

    let a = X % 100
    let b, r1 = a / 5, a % 5
    let c, r2 = r1 / 4, r1 % 4
    let d, r3 = r2 / 3, r2 % 3
    let e, r4 = r3 / 2, r3 % 2
    let f = r4

    let g = b + c + d + e + f
    if g * 100 <= X then
        printfn "1"
    else
        printfn "0"

    0