Pregunta de entrevista de Google

Implement a function, F(int n) to calculate the nth Fibonacci number.