input: from typing import List
  
  def exponential_series(x: int, n: int) -> int:
      """
      Calculate the exponential series for given x and n.
      
      >>> exponential_series(2, 3)
      15
      >>> exponential_series(1, 5)
      5
      """
      sum = 0
      for i in range(n+1):
          sum += x ** i
      return sum
output:     sum = 0
      for i in range(n+1):
          sum += x ** i
      return sum