C=====     MAIN PROGRAM FOR BREM1==============
      INTEGER NES,NU1,NU2,EXPI,
     *        IT,HI,S,NOM,
     *        NNL(27),LI(27),U1(27),IZ(27),
     *        M(5),M1(5),MZ(5),LM(5)
       REAL*8  P,MU,LAMI1,OM0,DOM,OM,
     *    LAMI(27),LAMM(125),XM0(5),DELXM(5),
     *    ME(20),FMEA2(570),RR(30),FME(125),FM(30),
     *    FMEA(125),FME1(125),FMEA1(125),P1(300),
     *    P2(300),OMT(30),SIGM(30),SIGM1(30),
     *    INT(21),RE(30),IME(30),Q1(21),
     *    Q2(21),FQR(21),CC(30),QQ(30),D1(30),RM(30),
     *    R1(2015),R2(2015),R5(2015),R6(2015),R8(260000)
      NAMELIST/BEFORE/NES,HI,IT,MU,NU1,NU2,EXPI,LAMI1,P,
     *      OM0,DOM,NOM,NE,S,NW1
      OPEN(5,FILE='SYS$INPU',STATUS='OLD')
      READ(5,BEFORE)
      IF((NE.GT.2000).OR.(NW1.GT.30).OR.(S.GT.27).OR.
     * (HI.GT.21).OR.(NES.GT.5)) PRINT 10
 10   FORMAT('    CHECK ARRAYS DIMENSIONS ')
      OPEN(6,FILE='SYS$OUTP',STATUS='NEW')
      OPEN(10,FILE='OLD$DB1',STATUS='OLD',FORM='UNFORMATTED')
      OPEN(11,FILE='OLD$DB2',STATUS='OLD',FORM='UNFORMATTED')
      CALL BREM1(NES,HI,IT,MU,NU1,NU2,EXPI,LAMI1,P,
     *     OM0,DOM,NOM,NE,S,NW1,
     *     LI,NNL,U1,LAMI,IZ,M,M1,MZ,LM,LAMM,XM0,DELXM,
     *     ME,FMEA2,RR,FME,FM,FMEA,FME1,FMEA1,P1,P2,
     *     OM,OMT,SIGM,SIGM1,INT,RE,IME,Q1,Q2,FQR,
     *     CC,QQ,D1,RM,
     *     R1,R2,R5,R6,R8)
      STOP
      END
