Add method to calculate the nth fibonacci number.