      PROGRAM hundredTo105
      IMPLICIT NONE
      integer(8) :: x
      integer(8) :: h,i,piyo(1:5),c
      
      read*,x
      
      !number of 100
      h = x / 100
      
      x = x - h * 100
      
      i = 5
      piyo = [1,2,3,4,5]
      c = 0
      do while( .true. )
        x = x - piyo(i)
          if( x > 0)then
            c = c + 1
          else if( x==0 )then
            c = c + 1
            exit
          else
            x = x + piyo(i)
            i = i - 1
          end if
      end do
      
      if( c>h )then
        print'(i0)',0
      else
        print'(i0)',1
      end if
      
      
      
      END PROGRAM