What is the intention of program below?
```
def lis(array):
    furthestPart = {}
    longest = 0

    for n, val in enumerate(array):

        prefix_lengths = [i for i in range(1, longest + 1) if array[furthestPart[i]] < val]

        if prefix_lengths:
            length = max(prefix_lengths)
        else:
            length = 0

        length1 = length + 1
        if length == longest or val < array[furthestPart[length1]]:
            longest = length1
            furthestPart[length1] = n

    return longest
```