
    Design an automated essay grading function that calculates the final score after applying cumulative penalties to a student's initial essay score. Starting with the original score, the system deducts points in increments of 2 for each detected error category (such as grammar, structure, or content issues), and adds up the remaining points after each deduction until no more points can be deducted. For example, if an essay starts with 10 points, the system would calculate 10 + (10-2) + (10-4) + (10-6) + (10-8) + (10-10), representing the weighted impact of each error category on the final grade. The function should take the initial score as input and return the sum of all intermediate scores during the penalty calculation process.
    

    
def sum_series(n):
    """
    Design an automated essay grading function that calculates the final score after applying cumulative penalties to a student's initial essay score. Starting with the original score, the system deducts points in increments of 2 for each detected error category (such as grammar, structure, or content issues), and adds up the remaining points after each deduction until no more points can be deducted. For example, if an essay starts with 10 points, the system would calculate 10 + (10-2) + (10-4) + (10-6) + (10-8) + (10-10), representing the weighted impact of each error category on the final grade. The function should take the initial score as input and return the sum of all intermediate scores during the penalty calculation process.
    

    """
def sum_series(n):
    """
    Design an automated essay grading function that calculates the final score after applying cumulative penalties to a student's initial essay score. Starting with the original score, the system deducts points in increments of 2 for each detected error category (such as grammar, structure, or content issues), and adds up the remaining points after each deduction until no more points can be deducted. For example, if an essay starts with 10 points, the system would calculate 10 + (10-2) + (10-4) + (10-6) + (10-8) + (10-10), representing the weighted impact of each error category on the final grade. The function should take the initial score as input and return the sum of all intermediate scores during the penalty calculation process.
    

    """
    if n < 1:
        return 0
    else:
        return n + sum_series(n - 2)