Write a function in Python to calculate the nth value of the Fibonacci sequence.
7
def fibonacci(n):
  if n == 0 or n == 1:
    return n
  else:
    return fibonacci(n - 1) + fibonacci(n - 2)
  
result = fibonacci(7)
print(result)