input: from typing import List
  
  
  def fibonacci_series_up_to_n(n: int) -> List[int]:
      """ Print the Fibonacci series up to a given number `n`.
      >>> fibonacci_series_up_to_n(5)
      [0, 1, 1, 2, 3]
      >>> fibonacci_series_up_to_n(10)
      [0, 1, 1, 2, 3, 5, 8]
      """
      if n < 0:
          return []
      
      series = [0]
      if n == 0:
          return series
  
      a, b = 0, 1
      series.append(b)
      
      while b < n:
          a, b = b, a + b
          if b < n:
              series.append(b)
      
      return series
output:     if n < 0:
          return []
      
      series = [0]
      if n == 0:
          return series
  
      a, b = 0, 1
      series.append(b)
      
      while b < n:
          a, b = b, a + b
          if b < n:
              series.append(b)
      
      return series