input: from typing import List
  
  
  def exponential_series(x: int, n: int) -> int:
      """ Calculate the exponential series for a given integer x up to n terms.
      The series is calculated as the sum of x raised to the power of each integer
      from 0 to n.
      >>> exponential_series(2, 3)
      15
      >>> exponential_series(3, 2)
      13
      """
output:     result = 0
      for i in range(n + 1):
          result += x ** i
      return result