input: Write a python function to calculate the nth Fibonacci number.
  assert fibonacci(0) == 0
  assert fibonacci(1) == 1
  assert fibonacci(5) == 5
  assert fibonacci(10) == 55
output: def fibonacci(n):
      if n <= 1:
          return n
      a, b = 0, 1
      for _ in range(n - 1):
          a, b = b, a + b
      return b