#include <bits/stdc++.h>
using namespace std;
#define REP(i,x,n) for(int i=x;i<(int)n;i++)
#define rep(i,n) REP(i,0,n)
#define sp(p) cout<<setprecision(16)<<fixed<<p<<endl;
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define SORT(a) sort(all(a))
#define RSORT(a) sort(rall(a))
#define UNIQ(a) unique(all(a))
#define VOUT(v,i) cout<<#v<<": ";for(int i=0;i<(int)v.size();i++){cout<<v[i]<<" ";}cout<<"\n";
#define vout(v) VOUT(v,z);
#define vmin(v) *min_element(all(v))
#define vmax(v) *max_element(all(v))
#define vsum(v) accumulate(all(v), 0LL);
#define MOUT(m,r,c) rep(i,r){rep(j,c){cout<<m[i][j]<<" ";}cout<<endl;}
#define mout(m) MOUT(m,m.size(),m[0].size())
#define debg(a) cout<<#a<<": "<<a<<endl;
#define show(a) for(cont &y:a){for(cont &x:y){cout<<x<<" ";}cout<<endl;}
#define digit(a) to_string(a).length();
template<class T>inline int out(const T &t){ print(t); putchar('\n'); return 0; }
template<class T>inline T gcd(T a,T b){if(b==0)return a; return(gcd(b,a%b));}
template<class T>inline T lcm(T a,T b){return a/gcd(a,b)*b;}
typedef long long ll;
typedef long double ld;
typedef pair<ll,ll> P;
typedef vector<ll> V;
// const long long MOD=1000000007;
const long long INF = 1e18;
#define EPS (1e-7)
#define PI (acos(-1))
template<class T>
inline bool chmax(T &a, T b) {
    if(a < b) { a = b; return true; }
    return false;
}
template<class T>
inline bool chmin(T &a, T b) {
    if(a > b) { a = b; return true; }
    return false;
}


void solve_old(long long X){
    ll ret=0;
    for (ll i = 0; i <= X/100; i++) {
        for (ll j = 0; i+j <= X/100; j++) {
            for (ll k = 0; i+j+k <= X/100; k++) {
                for (ll l = 0; i+j+k+l <= X/100; l++) {
                    for (ll m = 0; i+j+k+l+m <= X/100; m++) {
                        for (ll n = 0; i+j+k+l+m+n <= X/100; n++) {
                            ll val = i*100+j*101+k*102+l*103+m*104+n*105;
                            if(val==X) ret = 1;
                        }
                    }
                }
            }
        }
    }
    cout << ret << "\n";
}

void solve_old2(long long X){
    ll ret=0;
    for (ll i = 0; i <= X/100; i++) {
        for (ll j = 0; i+j <= X/100; j++) {
            for (ll k = 0; i+j+k <= X/100; k++) {
                for (ll l = 0; i+j+k+l <= X/100; l++) {
                    for (ll m = 0; i+j+k+l+m <= X/100; m++) {
                        ll val = i*100+j*101+k*102+l*103+m*104;
                        if((X-val)%105==0) ret=1;
                    }
                }
            }
        }
    }
    cout << ret << "\n";
}

// void solve_old3(long long X){
//     ll ret=0;
//     max_n = X/100;
//     kk.resize((max_n+1)*(max_n+1));
//     for (ll i = 0; i <= max_n; i++) {
//         for (ll j = 0; i+j <= max_n; j++) {
//             kk[i*(max_n+1)+j] = 104*i + 105*j;
//         }
//     }
//     SORT(kk);
//     vout(kk);
//     for (ll i = 0; i <= X/100; i++) {
//         for (ll j = 0; i+j <= X/100; j++) {
//             for (ll k = 0; i+j+k <= X/100; k++) {
//                 for (ll l = 0; i+j+k+l <= X/100; l++) {
//                     ll val = i*100+j*101+k*102+l*103;
//                     if(bin_s(X-val)) ret=1;
//                 }
//             }
//         }
//     }
//     cout << ret << "\n";
// }

ll max_n;
V kk;
bool bin_s(ll val){
    ll lo=1, hi=(max_n+1)*(max_n+1)*(max_n+1);
    while(hi-lo>=1){
        ll mid=(hi+lo)/2;
        if(kk[mid]==val) return true;
        else if(kk[mid]<val) lo = mid+1;
        else hi = mid;
    }
    return false;
}

void solve_old4(long long X){
    ll ret=0;
    max_n = X/100;
    kk.resize((max_n+1)*(max_n+1)*(max_n+1));
    for (ll i = 0; i <= max_n; i++) {
        for (ll j = 0; i+j <= max_n; j++) {
            for (ll k = 0; i+j+k <= max_n; k++) {
                kk[i*(max_n+1)*(max_n+1)+j*(max_n+1)+k] = 103*i + 104*j + 105*k;
            }
        }
    }
    SORT(kk);
    vout(kk);
    for (ll i = 0; i <= X/100; i++) {
        for (ll j = 0; i+j <= X/100; j++) {
            for (ll k = 0; i+j+k <= X/100; k++) {
                ll val = i*100+j*101+k*102;
                if(bin_s(X-val)) ret=1;
            }
        }
    }
    cout << ret << "\n";
}

void solve(long long X){
    ll cnt=X/100;
    ll ret=0;
    if(100*cnt<=X && X<=105*cnt){
        ret=1;
    }
    cout << ret << "\n";
}

int main(){
    long long X;
    scanf("%lld",&X);
    solve(X);
    return 0;
}


Measured memory_bytes: 256