function output = fib(n)

    if n < 2
        output = n;
    else
        output = fib(n - 1) + fib(n - 2);
    end

end