// Original C++ solution (slower):
/**

 * code generated by JHelper

 * More info: https://github.com/AlexeyDmitriev/JHelper

 * @author champon

 */



#include <iostream>

#include <fstream>



#include <bits/stdc++.h>

using namespace std;

#define ll long long

#define rep(i, n) for(ll i=0; i<n; i++)

#define repr(i, s, e) for(ll i=s; i>=e; i--)

#define reps(i, s, e) for(ll i=s; i<=e; i++)

#define inf 1e18

#define all(v) v.begin(),v.end()

#define ceil(a, b) (a+b-1)/b

#define ok cout << "ok" << endl;

#define sp << " " <<

template<typename T> inline bool chmax(T &a, T b){ if(a<b) a=b; return a<b; }

template<typename T> inline bool chmin(T &a, T b){ if(b<a) a=b; return b<a; }

template<typename T> void vdeb(T v){

    cout << "#vector set debug" << endl;

    for(auto vv : v) cout << vv << " ";

    cout << endl;

}

template<typename T1, typename T2> void adeb(T1 arr[], T2 n){

    cout << "#adebug" << endl;

    for(int i=0; i<=n; i++) cout << arr[i] << " ";

    cout << endl;

}

template<typename T1> void mdeb(T1 mp){

    cout << "#map pair debug" << endl;

    for(auto const& m : mp) cout << m.first sp m.second << endl;

}

template<typename A, size_t N, typename T>

void Fill(A (&array)[N], const T &val){ fill((T*)array, (T*)(array+N), val); }

void ans(bool b){ cout << (b ? "Yes" : "No") << endl; }

void ans2(bool b){ cout << (b ? "YES" : "NO") << endl; }

int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};

int dy[] = {0, 1, 0, -1, 1, -1, -1, 1};





class C100To105 {

public:

	void solve(std::istream& in, std::ostream& out) {

	    int x;

	    in >> x;



        int dp[100010];

        Fill(dp, 0);

        dp[0] = 1;

        reps(i, 1, 100000){

            if(i >= 100 && dp[i-100]) dp[i] = 1;

            if(i >= 101 && dp[i-101]) dp[i] = 1;

            if(i >= 102 && dp[i-102]) dp[i] = 1;

            if(i >= 103 && dp[i-103]) dp[i] = 1;

            if(i >= 104 && dp[i-104]) dp[i] = 1;

            if(i >= 105 && dp[i-105]) dp[i] = 1;

        }



        out << dp[x] << endl;

	}

};





int main() {

	C100To105 solver;

	std::istream& in(std::cin);

	std::ostream& out(std::cout);

	solver.solve(in, out);

	return 0;

}


// Optimized solution to the same problem (faster):
/**

 * code generated by JHelper

 * More info: https://github.com/AlexeyDmitriev/JHelper

 * @author champon

 */



#include <iostream>

#include <fstream>



#include <bits/stdc++.h>

#define se cout << "test ok" << endl;

#define sp << " " <<

using namespace std;

using ll = long long;

using ld = long double;

ll mod = ll(1e9)+7;

ll inf = ll(1e18);

template<typename T1, typename T2> ll ceill(T1 a, T2 b){ return (a+b-1)/b; }

void ans(bool b, ostream& out=cout){ out << (b ? "Yes" : "No") << endl; }

void ans2(bool b, ostream& out=cout){ out << (b ? "YES" : "NO") << endl; }

template<typename T> inline bool chmax(T &a, T b){ if(a<b){a=b; return true;} return false; }

template<typename T> inline bool chmin(T &a, T b){ if(a>b){a=b; return true;} return false; }

template<typename A, size_t N, typename T> void Fill(A (&array)[N], const T &val){ fill((T*)array, (T*)(array+N), val); }

int dx[] = {1, 0, -1, 0, 1, -1, 1, -1};

int dy[] = {0, 1, 0, -1, 1, -1, -1, 1};



#ifndef INCLUDE_DEBUG_HPP

#define INCLUDE_DEBUG_HPP



#include <iostream>

#include <vector>

#include <map>

using namespace std;



namespace dbg {

    using ll = long long;



    class Debug {

    public:

        Debug(){}

        template<typename T>

        void vd(vector<T> vec);

        template<typename T>

        void vd2(vector<vector<T>> vec);

        template<typename T>

        void ad(T *arr, ll n);

        template<typename T, size_t N>

        void ad2(T (&arr)[N], ll n);

        template<typename T>

        void md(T mp);

    };



    template<typename T>

    void Debug::vd(vector<T> vec) {

        for (auto vv : vec) cout << vv << " ";

        cout << endl;

    }



    template<typename T>

    void Debug::vd2(vector<vector<T>> vec) {

        for (auto vv : vec) for (auto vvv : vv) cout << vvv << " ";

        cout << endl;

    }



    template<typename T>

    void Debug::ad(T *arr, ll n) {

        for (int i = 0; i <= n; i++) cout << arr[i] << " ";

        cout << endl;

    }



    template<typename T, size_t N>

    void Debug::ad2(T (&arr)[N], ll n) {

        for (int i = 0; i <= N; i++) for (int j = 0; j <= n; j++) cout << arr[i][j] << " ";

        cout << endl;

    }



    template<typename T>

    void Debug::md(T mp) {

        cout << "key : value" << endl;

        for (auto const &m : mp) cout << m.first << " : " << m.second << endl;

        cout << endl;

    }



}



#endif //INCLUDE_DEBUG_HPP



using dbg::Debug;

Debug debug;



class C100To105 {

public:

	void solve(std::istream& in, std::ostream& out) {

	    ll x;

	    in >> x;

	    ll hun = x%100;



        int cnt = 0;

        while(hun > 0){

            for(int i=5; i>0; i--){

                if(hun >= i){

                    hun -= i;

                    break;

                }

            }

            cnt++;

        }



        ll hungt = x/100;

//        cout << hungt sp cnt << endl;

        if(hungt >= cnt) out << 1 << endl;

        else out << 0 << endl;

	}

};





int main() {

	C100To105 solver;

	std::istream& in(std::cin);

	std::ostream& out(std::cout);

	solver.solve(in, out);

	return 0;

}


// Fastest known solution for this problem: