c_______________________________________________________________________________

c     Calculo del numero e (suma de n terminos de la serie).        Version GOTO

      implicit real*8 (a-h,o-z)

      parameter(UNO=1.d+00)

    1 write(6,'(/,a,$)') ' Numero de terminos = '
      read(5,*) n
      if (n.lt.0) goto 1

      f=UNO
      e=UNO
      i=1
   10 continue
        if (i.gt.n) goto 20
        f=f/dble(i)
        e=e+f
        i=i+1
        goto 10
   20 continue

      write(6,100) n,e
  100 format(/,' n = ',i10,'      -> e = ',e24.16)

      read(5,'()')
      call exit(0)

      end
