      program enread
      dimension x(15),y(15),z(15)
      dimension e(15),am(15)
      character*30 aa
      character*20  aa1,aa2
      open(1,file="fe-bcc.out")
  10  continue
      read(1,*) aa
      if (aa.EQ."-outvars:") goto 20
      goto 10
  20  continue
  11  continue
      read(1,*) aa
      if (aa.EQ."-outvars:") goto 21
      goto 11
  21  continue
      do i=1,15
         read(1,*) aa,x(i),y(i),z(i)
      end do
      do i=1,4
         read(1,*) aa,dummy
      end do
      do i=1,15
         read(1,*) aa2,e(i)
c         write(*,*) aa2
      end do
      rewind(1)
      do i=1,15
  12    continue
        read(1,*) aa
        if (aa.EQ."Fermi") goto 22
        goto 12
  22    continue
        read(1,*) aa,aa1,aa2,am(i)
      end do
      open(2,file='./bulk/bulk2.dat')   
      do i=1,15
         write(*,*) x(i),e(i),am(i)
         write(2,*) x(i),0.5*x(i)*x(i)*x(i),am(i),e(i)
      end do
      close(1)
      close(2)
  100 format(3X,A8,1X,F14.11)
      end
             
