def fib(n):
 if (n <= 2):
  return n
 if (n in _fib_cache):
  return _fib_cache[n]
 result = (fib((n - 1)) + fib((n - 2)))
 _fib_cache[n] = result
 return result

def fib ( n ) : if ( n <= 2 ) : return n if ( n in _fib_cache ) : return _fib_cache [ n ] result = ( fib ( ( n - 1 ) ) + fib ( ( n - 2 ) ) ) _fib_cache [ n ] = result return result
return the num-th fibonacci number .