import CoreFoundation
let n=Int(readLine()!)!

if n < 100  {
  print("0")
  exit(0)
}

var min =  ( n / 100 ) * 100 
var max =  min + ( ( n / 100 ) * 5 )

if( ( min >= n ) && ( n <= max ) ) {
  print("1")
} else {
  print("0")
}