X = gets.to_i
a = X / 100
b = X / 105
two = []
three = []
four = []
five = []
(0..1000).each{|i|
  two[i] = i * 2
  three[i] = i * 3
  four[i] = i * 4
  five[i] = i * 5
}
a = a > 60 ? 60 : a
z = X - 100 * a
(0..a).each{|j|
  (0..a-j).each{|k|
    (0..a-j-k).each{|l|
      (0..a-j-k-l).each{|m|
        (0..a-j-k-l-m).each{|n|
          r = j + two[k] + three[l] + four[m] + five[n]
          if r == z
            puts 1
            exit
          end
        }
      }
    }
  }
}
puts 0