input: 
  def fibonacci(n: int) -> int:
      """ Calculate the nth Fibonacci number.
      >>> fibonacci(0)
      0
      >>> fibonacci(1)
      1
      >>> fibonacci(9)
      21
      """
      a = 0
      b = 1
      if n < 0:
          return "Incorrect input"
      elif n == 0:
          return a
      elif n == 1:
          return b
      else:
          for _ in range(2, n + 1):
              c = a + b
              a = b
              b = c
          return b
  
  # Test cases
  print(fibonacci(0))  # Output: 0
  print(fibonacci(1))  # Output: 1
  print(fibonacci(9))  # Output: 21
  
output:     a = 0
      b = 1
      if n < 0:
          return "Incorrect input"
      elif n == 0:
          return a
      elif n == 1:
          return b
      else:
          for _ in range(2, n + 1):
              c = a + b
              a = b
              b = c
          return b