Implementation of Fib function for Ex 13