#include
#define ll long long int
#define endl '\n'
#define pb push_back
#define all(x) x.begin(), x.end()
using namespace std;
const ll N = 1e5+5 ;
ll n, f[N]={}, a[6]={100, 101, 102, 103, 104, 105} ;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
freopen("buying.inp","r",stdin);
freopen("buying.out","w",stdout);
cin >> n ;
f[0] = 1 ;
for ( ll i=0 ; i < 6 ; i++) {
for ( ll j=a[i] ; j <= n ; j++)
if (f[j - a[i]] == 1) f[j] =1 ;
}
cout << f[n] ;
}