function Main(input) {
    const n = input.split("\n")[0];
    var ans = 0 
    for(var i = 1; i <= n; i++){
        for (var j =  i * 101; j <= i* 105; i++) {
        if (n === j) {
            ans = 1
            break;
        }
    }
    }
    console.log(ans)
    }    
Main(require("fs").readFileSync("/dev/stdin", "utf8"));
  