program one_hundred_to_one_hundred_five
  implicit none
  integer :: x, l, u, i, d
  read(*,*) x
  l = x/105
  u = (x+99)/100
  do i = l, u
    d = x-100*i
    if (0 <= d .and. d <= 5*i) then
      write(*,'(i0)') 1
      stop
    end if
  end do
  write(*,'(i0)') 0
end program one_hundred_to_one_hundred_five