X = gets.to_i
a = X / 100
b = X / 105
(b..a).each{|i|
  (0..i).each{|j|
    (0..i-j).each{|k|
      (0..i-j-k).each{|l|
        (0..i-j-k-l).each{|m|
          (0..i-j-k-l-m).each{|n|
            r = (i-j-k-l-m-n) * 100 + j * 101 + k * 102 + l * 103 + m * 104 + n * 105
            if r == X
              puts 1
              exit
            end
          }
        }
      }
    }
  }
}
puts 0