input: from typing import List
  
  def exponential_series(x: float, n: int) -> float:
      """ Calculate the exponential series of a number x using the first n+1 terms.
      >>> exponential_series(1, 2)
      3.0
      >>> exponential_series(2, 3)
      15.0
      """
output:     result = 0.0
      for i in range(n + 1):
          result += x ** i / math.factorial(i)
      return result