def lucas(n):
    """Function that returns value of the given index from Lucas sequence"""
    previous = 2
    current = 1
    try:
        for i in range(n):
            previous, current = current, previous + current
        return previous
    except TypeError:
        return ("Input should be a one integer")