input: from typing import List
  
  def fibonacci(n: int) -> int: 
      a = 0
      b = 1
      if n < 0: 
          return -1
      elif n == 0: 
          return a 
      elif n == 1: 
          return b 
      else: 
          for i in range(2,n+1): 
              c = a + b 
              a = b 
              b = c 
          return b 
  
  # Test cases
  """
  >>> fibonacci(9)
  34
  >>> fibonacci(0)
  0
  >>> fibonacci(1)
  1
  >>> fibonacci(-1)
  -1
  """
output:     a = 0
      b = 1
      if n < 0: 
          return -1
      elif n == 0: 
          return a 
      elif n == 1: 
          return b 
      else: 
          for i in range(2,n+1): 
              c = a + b 
              a = b 
              b = c 
          return b