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|
          r = 100 * i + j + k * 2 + l * 3 + m * 4 + (i-j-k-l) * 5
          if r == X
            puts 1
            exit
          end
        }
      }
    }
  }
}
puts 0