import std;

alias sread = () => readln.chomp();
alias lread = () => readln.chomp.to!long();
alias aryread(T = long) = () => readln.split.to!(T[]);
//aryread!string();
//auto PS = new Tuple!(long,string)[](M);
//x[]=1;でlong[]全要素1に初期化
void main()
{
    auto n = lread();
    // writeln(n);
    long 余り = n % 100;
    // writeln(余り);
    long これだけ個買える = (n - 余り) / 100;
    // writeln(これだけ個買える);
    if (これだけ個買える * 5 >= 余り)
    {
        writeln(1);
    }
    else
    {
        writeln(0);
    }
}

void scan(L...)(ref L A)
{
    auto l = readln.split;
    foreach (i, T; L)
    {
        A[i] = l[i].to!T;
    }
}

void arywrite(T)(T a)
{
    a.map!text.join(' ').writeln;
}
