        implicit real*8 (a-h,o-z)
        character*4 seconds
        character*10 pop
        character*120 linbuf
        character*11 timebuf
        character*80 popbuf
        open(unit=10,file='output',status='old')
        open(unit=11,file='pop.dat',status='unknown')

        seconds='Time'
        pop='population'

  80    read(10,1000,end=8000)linbuf
        its=index(linbuf,seconds)
        if(its.eq.0) then
        goto 80
        else
        timebuf=linbuf(10:19)
  81    read(10,1000,end=8000)linbuf
        itp=index(linbuf,pop)
        if(itp.eq.0) then
        goto 81
        else
        popbuf=linbuf(15:100)
        write(11,*)timebuf,popbuf
        goto 80
        endif
        endif

1000    format(a120)
8000    stop
        end

