def fib(n):
    """
    Takes a term `n` and returns `fib(n)`.

    :param n: the term for the sequence
    :return: fib(n)
    """
    if n == 1:
        return 1
    elif n == 2:
        return 2
    else:
        return fib(n - 1) + fib(n - 2)