def nth_fibonacci(number: int) -> int:
    """Returns value of nth fibonacci sequence.

    Args:
        number (int): sequential number

    Examples:
        >>> assert nth_fibonacci(4) == 2
    """
    number -= 1
    counter, helper = 0, 1
    while number:
        counter, helper = helper, counter + helper
        number -= 1
    return counter