Function to compute the nth Fibonacci number