let read f = stdin.ReadLine() |> f
let x = read int

let dp : bool array = Array.zeroCreate 100001
for i = 0 to 5 do
    dp.[100+i] <- true

for i = 200 to x do
    for j = 100 to 105 do
        match dp.[i-j] with
        | true -> dp.[i] <- true
        | false -> ()

if dp.[x] then 1 else 0
|> printfn "%d"