       real*8 mean, mag, fl, aa, bb, cc, dd
       dimension a(1)
       dimension b(4)
       dimension c(10000000)
       dimension d(10000000)
       dimension e(10000000)
       dimension r(10000000)
       integer x, y, z, q, w
       open (1,file='non') 
       read (1,*) (a(x), x=1, 1)

       n = a(1)

       open (2,file='info') 
       read (2,*) (b(y), y=1, 4)

       open (3,file='time')
       read (3,*) (c(z), z=1, n)
 
       open (4,file='flux')
       read (4,*) (d(q), q=1, n)
       
c       open (5,file='error')
c       read (5,*) (e(w), w=1, n)

       aa = b(1)
       bb = b(2)
       cc = b(3)
       dd = b(4)


       mean = 0.0
       do i=1, n 
       mean = mean + d(i)
       end do
       mean = mean/n

       do i=1, n
       r(i) = aa+bb*c(i)+cc*(c(i)**2)+dd*(c(i)**3)
       end do
       
       do i=1, n
       mag = (d(i)-r(i))+mean
c       write (9,*) c(i), mag, e(i)
       write (9,*) c(i), mag
       end do
       end 
