input: from typing import List
  
  def fibonacci_series_upto_n(n: int) -> List[int]:
      """Generate a list of Fibonacci numbers up to a given number n.
      The series starts with 0 and 1, and each subsequent number is the sum of the previous two.
      
      >>> fibonacci_series_upto_n(10)
      [0, 1, 1, 2, 3, 5, 8]
      >>> fibonacci_series_upto_n(20)
      [0, 1, 1, 2, 3, 5, 8, 13]
      """
      if n < 0:
          return []
      
      fib_series = [0, 1]
      while True:
          next_value = fib_series[-1] + fib_series[-2]
          if next_value > n:
              break
          fib_series.append(next_value)
      
      return fib_series
output:     if n < 0:
          return []
      
      fib_series = [0, 1]
      while True:
          next_value = fib_series[-1] + fib_series[-2]
          if next_value > n:
              break
          fib_series.append(next_value)
      
      return fib_series