def fibonacci_memory(nth_nmb: int) -> int:
    """An recursive approach to find Fibonacci sequence value, storing those already calculated."""

    # Initial cache is set, hardcoded values make up the numbers for the base case
    cache = {0: 0, 1: 1}

    def fib_mem(_n):
        if _n not in cache:

            # Add fibonacci values to cache as recursion depth increases.
            cache[_n] = fib_mem(_n - 1) + fib_mem(_n - 2)
            return cache[_n]
        else:

            # Base case, returns the initial cache values of key 0 and 1
            return cache[_n]

    return fib_mem(nth_nmb)