input: from typing import List
  
  
  def fibonacci(n: int) -> int:
      """Calculate the nth number in the Fibonacci sequence.
      >>> fibonacci(0)
      0
      >>> fibonacci(1)
      1
      >>> fibonacci(9)
      34
      >>> fibonacci(10)
      55
      >>> fibonacci(-1)
      Traceback (most recent call last):
          ...
      ValueError: Input value must be non-negative
      """
      if n < 0:
          raise ValueError("Input value must be non-negative")
      a, b = 0, 1
      if n == 0:
          return a
      elif n == 1:
          return b
      else:
          for _ in range(2, n + 1):
              a, b = b, a + b
          return b
output:     if n < 0:
          raise ValueError("Input value must be non-negative")
      a, b = 0, 1
      if n == 0:
          return a
      elif n == 1:
          return b
      else:
          for _ in range(2, n + 1):
              a, b = b, a + b
          return b