#include <bits/stdc++.h>
struct Fast {Fast(){std::cin.tie(0);std::ios::sync_with_stdio(false);}} fast;
typedef long long ll;
typedef long double ld;
#define rep(i, n) for (ll i = 0; i < (int)(n); i++)
#define repR(i, n) for(ll i = n; i >= 0; i--)
#define For(i, m, n) for(ll i = m; i < n; i++)

#define pb push_back
#define eb emplace_back
#define mp make_pair
#define Fi first
#define Se second
#define ALL(v) v.begin(), v.end()

using namespace std;

ll mod = 1e9+7;
inline ll gcd(ll a, ll b){
    ll r = a % b;
    while(r!=0){
        a = b;
        b = r;
        r = a % b;
    }
    return b;
}

inline ll lcm(ll x, ll y)
{
    if(x == 0 || y == 0) {
        return -1;
    }
    
    return (x * y / gcd(x, y));
}

inline ll modinv(ll a, ll m) {
    ll b = m, u = 1, v = 0;
    while (b) {
        ll t = a / b;
        a -= t * b; swap(a, b);
        u -= t * v; swap(u, v);
    }
    u %= m;
    if (u < 0) u += m;
    return u;
}

inline ll nCr(ll n, ll r) {
    if ( r * 2 > n ) r = n - r;
    ll dividend = 1;
    ll divisor  = 1;
    for ( ll i = 1; i <= r; ++i ) {
        dividend *= (n-i+1);
        divisor  *= i;
    }
    return (dividend / divisor);
}

inline vector<pair<ll, int>>factorize(ll n){
    vector<pair<ll, int>> res;
    for(ll i = 2; i * i <= n; ++i){
        if(n % i) continue;
        res.emplace_back(i, 0);
        while(n % i == 0){
            n /= i;
            res.back().second++;
        }
    }
    if(n != 1) res.emplace_back(n, 1);
    return res;
}

inline bool compare_by_b(pair<int, int> a, pair<int, int> b) {
    if(a.second != b.second){
        return a.second < b.second;
    }else{
        return a.first < b.first;
    }
}
ll facctorialMethod(ll k){
    ll sum = 1;
    for (int i = 1; i <= k; ++i)
    {
        sum *= i;
    }
    return sum;
}

int main(){
    ll x;
    cin >> x;
    
    if(x < 100){
        cout << 0 << endl;
        return 0;
    }
    
    ll max = 1000000;
    ll a = 100, b = 101, c = 102, d= 103, e = 104, f = 105;
    
    if(x % a == 0 || x % b == 0 || x % c == 0 || x % d == 0 || x % e == 0 || x % f == 0){
        cout << 1 << endl;
        return 0;
    }
    
    rep(aa, max){
        ll aaa = aa * a;
        if(x < aaa){
            cout << 0 << endl;
            return 0;
        }
        rep(bb, max){
            ll ab = aaa + (bb * b);
            if(x < ab){
                break;
            }
            rep(cc, max){
                ll abc = ab + (cc * c);
                if(x < abc){
                    break;
                }
                rep(dd, max){
                    ll abcd = abc + (dd * d);
                    if(x < abcd){
                        break;
                    }
                    rep(ee, max){
                        ll abcde = abcd + (ee * e);
                        if(x < abcde){
                            break;
                        }
                        rep(ff, max){
                            ll abcdef = abcde + (ff * f);
                            if(x < abcdef){
                                break;
                            }
                            if(abcdef == x){
                                cout << 1 << endl;
                                return 0;
                            }
                        }
                    }
                }
            }
        }
    }
    
    cout << 0 << endl;
    return 0;
}


Measured memory_bytes: 256