

def lis(arr):
    max_lis = 0
    for i in xrange(len(arr)):
        count = 1
        boundary = arr[i]
        for j in xrange(i + 1, len(arr)):
            if arr[j] > boundary:
                count += 1
                boundary = arr[j]
        if count > max_lis:
            max_lis = count

    return max_lis


if __name__ == '__main__':
    print lis([10, 9, 2, 5, 3, 7, 101, 18])
