input: from typing import List
  
  def fibonacci_series(n: int) -> List[int]:
      """ Generate and return a list of Fibonacci numbers up to the given number n.
      If n is less than 0, return an empty list.
      Example:
      >>> fibonacci_series(10)
      [0, 1, 1, 2, 3, 5, 8]
      >>> fibonacci_series(-5)
      []
      >>> fibonacci_series(1)
      [0, 1]
      """
      if n < 0:
          return []
      a, b = 0, 1
      fib_series = []
      while a <= n:
          fib_series.append(a)
          a, b = b, a + b
      return fib_series
  
  n = int(input("Enter a number: "))
  print(fibonacci_series(n))
output:     if n < 0:
          return []
      a, b = 0, 1
      fib_series = []
      while a <= n:
          fib_series.append(a)
          a, b = b, a + b
      return fib_series