fib with log(n) time efficiency