process.stdin.resume();
process.stdin.setEncoding('utf8');
// 自分の得意な言語で
// Let's チャレンジ！！

var lines = [];
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});
reader.on('line', (line) => {
  lines.push(line);
});
reader.on('close', () => {
  var x= parseInt(lines[0],10);
  var y = Math.floor(x/100);
if(y<1){
    console.log(0);
}else{
    var aa= x%100;
 
    if(aa<=y*5){
        console.log(1);
    }else{
        console.log(0);
    }
}
  
  
  
  
  
});