input: from typing import List
  
  def calculate_fibonacci_numbers(n: int) -> List[int]:
      """
      Calculate the Fibonacci numbers up to a given number n.
  
      >>> calculate_fibonacci_numbers(0)
      [0]
      >>> calculate_fibonacci_numbers(5)
      [0, 1, 1, 2, 3, 5]
      >>> calculate_fibonacci_numbers(10)
      [0, 1, 1, 2, 3, 5, 8]
      """
      if n == 0:
          return [0]
      elif n == 1:
          return [0, 1]
      else:
          fib_sequence = [0, 1]
          while fib_sequence[-1] <= n:
              fib_sequence.append(fib_sequence[-1] + fib_sequence[-2])
          fib_sequence.pop()  # Remove the last element which exceeds n
          return fib_sequence
output:     if n == 0:
          return [0]
      elif n == 1:
          return [0, 1]
      else:
          fib_sequence = [0, 1]
          while fib_sequence[-1] <= n:
              fib_sequence.append(fib_sequence[-1] + fib_sequence[-2])
          fib_sequence.pop()  # Remove the last element which exceeds n
          return fib_sequence