      DOUBLE PRECISION A(2000), B(2000), XT0, XBAR, C(20), SUM, AVERAGE
      INTEGER I,J,K,I1,SEED,I2
     
      XT0=0.0672
C      XBAR=0.0348
      XBAR=XT0
      I1=500
      
      
      DO I=1,I1
      READ(*,*) A(I), B(I)
C      write(*,*) A(i),b(i)
      END DO
      
3      DO I2=1,100
      
      DO J=1,10

      K=INT(RAND(0)*500)+1

      C(J)=B(K)
C     write(*,*) K, C(j)
      SUM=SUM+C(J)
      END DO
      
      AVERAGE=SUM/10.0
      SUM=0.0D+00
      
      WRITE(*,1) AVERAGE
      END DO
      
1     FORMAT(F12.3)
      
      STOP
      END