
    In an adaptive learning system, you need to determine the optimal learning path that maximizes student achievement while ensuring progressive skill development. Given a sequence of student performance scores and a future milestone assessment, find the highest cumulative score possible from a series of increasingly difficult activities up to the current position, while also including the specified future milestone score. The selected activities must form a strictly increasing sequence of scores to ensure the student is challenged appropriately. The solution should help identify the most effective learning progression that prepares the student for the upcoming milestone assessment.
    

    
def max_sum_increasing_subseq(a, n, index, k):
    """
    In an adaptive learning system, you need to determine the optimal learning path that maximizes student achievement while ensuring progressive skill development. Given a sequence of student performance scores and a future milestone assessment, find the highest cumulative score possible from a series of increasingly difficult activities up to the current position, while also including the specified future milestone score. The selected activities must form a strictly increasing sequence of scores to ensure the student is challenged appropriately. The solution should help identify the most effective learning progression that prepares the student for the upcoming milestone assessment.
    

    """
def max_sum_increasing_subseq(a, n, index, k):
    """
    In an adaptive learning system, you need to determine the optimal learning path that maximizes student achievement while ensuring progressive skill development. Given a sequence of student performance scores and a future milestone assessment, find the highest cumulative score possible from a series of increasingly difficult activities up to the current position, while also including the specified future milestone score. The selected activities must form a strictly increasing sequence of scores to ensure the student is challenged appropriately. The solution should help identify the most effective learning progression that prepares the student for the upcoming milestone assessment.
    

    """
    dp = [[0 for i in range(n)] for i in range(n)]
    for i in range(n):
        if a[i] > a[0]:
            dp[0][i] = a[i] + a[0]
        else:
            dp[0][i] = a[i]
    for i in range(1, n):
        for j in range(n):
            if a[j] > a[i] and j > i:
                if dp[i - 1][i] + a[j] > dp[i - 1][j]:
                    dp[i][j] = dp[i - 1][i] + a[j]
                else:
                    dp[i][j] = dp[i - 1][j]
            else:
                dp[i][j] = dp[i - 1][j]
    return dp[index][k]