let () =
    let arr = Array.make 100001 false in
    arr.(0) <- true;
    for i = 0 to 100000 do
        if arr.(i) then (
            for j = 100 to 105 do
                if i + j <= 100000 then arr.(i + j) <- true
            done
        )
    done;
    let main () =
        let n = int_of_string (read_line ()) in
        Printf.printf "%d\n" (if arr.(n)then 1 else 0)
    in
    main ()