import std.stdio, std.array, std.string, std.conv, std.algorithm;
import std.typecons, std.range, std.random, std.math, std.container;
import std.numeric, std.bigint, core.bitop, core.stdc.stdio;

void main() {
    auto X = readln.chomp.to!int;

    auto dp = new int[](100);
    dp[] = 1 << 29;
    dp[0] = 0;

    foreach (i; 0..100) {
        foreach (j; 1..6) {
            if (i + j < 100) {
                dp[i + j] = min(dp[i + j], dp[i] + 1);
            }
        }
    }

    if (dp[X % 100] <= X / 100) {
        writeln(1);
    } else {
        writeln(0);
    }
}