c
      program grintbx1
c
      dimension F(8),Gr(8),Gs(8),Gt(8)

      do i=1,8
        F(i)=1
      end do
c
 10   write(*,*)'Enter Location -1<(r,s,t)<+1:'
      read(*,*)r,s,t
c
      Gr(1)=(1.0+r)/2.0
      Gr(2)=(1.0-r)/2.0
      Gr(3)=Gr(2)
      Gr(4)=Gr(1)
      Gr(5)=Gr(1)
      Gr(6)=Gr(2)
      Gr(7)=Gr(2)
      Gr(8)=Gr(1)
c
      Gs(1)=(1.0+s)/2.0
      Gs(3)=(1.0-s)/2.0
      Gs(2)=Gs(1)
      Gs(4)=Gs(3)
      Gs(5)=Gs(1)
      Gs(6)=Gs(1)
      Gs(7)=Gs(3)
      Gs(8)=Gs(3)
c
      Gt(1)=(1.0+t)/2.0
      Gt(5)=(1.0-t)/2.0
      Gt(2)=Gt(1)
      Gt(3)=Gt(1)
      Gt(4)=Gt(1)
      Gt(6)=Gt(5)
      Gt(7)=Gt(5)
      Gt(8)=Gt(5)
c
      Frst=0.0
      do i=1,8
        write(*,*)Gr(i),Gs(i),Gt(i),Gr(i)*Gs(i)*Gt(i)
c        write(1,*)Gr(i),Gs(i),Gt(i),Gr(i)*Gs(i)*Gt(i)
        Frst=Frst+Gr(i)*Gs(i)*Gt(i)*F(i)
      end do
c
      write(*,*)'Frst=',Frst
c      write(1,*)'Frst=',Frst
      goto 10
c
      stop
      end

