      character*65 text
      character*60 input,output
      character*42 text1
c
      write (*,*) 'Input-File:'
      read (*,999) input
c
      write (*,*) 'Output-File:'
      read (*,999) output
  999 format (a60)
c
      write (*,*) 'Negative offsets'
      write (*,*) 'Shot min,max:'
      read (*,*) nmin,nmax
c

      open (10,file=input,status='old')
      open (11,file=output,status='new')
c
      do 10 i=1,7
        read (10,998) text
  998   format (a65)
        write (11,998) text
   10 continue
c
   20 read (10,997,err=20,end=30) ish,text1,x
  997 format (i5,a42,f9.3)
      if (ish.ge.nmin.and.ish.le.nmax) then
        x=abs(x)*(-1.)
       else
        x=abs(x)
      endif
      write (11,997) ish,text1,x
      goto 20
c
   30 close (10)
      close (11)
      stop
      end
