c_______________________________________________________________________________

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

      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
      do i=1,n
        f=f/dble(i)
        e=e+f
      enddo

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

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

      end
