input: from typing import List
  
  def fibonacci_up_to(n: int) -> List[int]:
      """ Calculate and return the Fibonacci numbers up to the given number n.
      >>> fibonacci_up_to(0)
      [0]
      >>> fibonacci_up_to(1)
      [0, 1, 1]
      >>> fibonacci_up_to(5)
      [0, 1, 1, 2, 3, 5]
      """
      if n < 0:
          return []
      fib_series = [0, 1]
      while fib_series[-1] <= n:
          next_value = fib_series[-1] + fib_series[-2]
          if next_value > n:
              break
          fib_series.append(next_value)
      return fib_series if n != 0 else [0]
output:     if n < 0:
          return []
      fib_series = [0, 1]
      while fib_series[-1] <= n:
          next_value = fib_series[-1] + fib_series[-2]
          if next_value > n:
              break
          fib_series.append(next_value)
      return fib_series if n != 0 else [0]