var N : Int = (Int)(readLine()!)!
let data : [Int]  = [100,101,102,103,104,105]
let size = 1000000 + 1;
var dp = [Int](count: size, repeatedValue: -1)
dp[0] = 0;

for idx in 0..<size{
    if dp[idx] == -1{
        continue;
    }
    for value in data{
        if idx + value  < size {
            dp[idx + value] = 1;
        }
    }
}

if dp[N] == -1 {
    print(0)
} else {
    print(1)
}
