
    Design a function for an adaptive learning platform that calculates the total engagement score across multiple difficulty levels of a learning module. Starting from an initial difficulty level, the system needs to generate progressively easier sub-levels by reducing the difficulty by 2 points each time, until reaching the base level (0 or 1). The engagement score for each sub-level is equal to its difficulty rating, and the function should return the sum of all these difficulty ratings. This scoring system helps determine the optimal starting difficulty for new students by analyzing their performance across the full spectrum of difficulty levels. For example, if the initial difficulty is 7, the system would calculate the sum of difficulty levels 7, 5, 3, and 1.
    

    
def sum_series(n):
    """
    Design a function for an adaptive learning platform that calculates the total engagement score across multiple difficulty levels of a learning module. Starting from an initial difficulty level, the system needs to generate progressively easier sub-levels by reducing the difficulty by 2 points each time, until reaching the base level (0 or 1). The engagement score for each sub-level is equal to its difficulty rating, and the function should return the sum of all these difficulty ratings. This scoring system helps determine the optimal starting difficulty for new students by analyzing their performance across the full spectrum of difficulty levels. For example, if the initial difficulty is 7, the system would calculate the sum of difficulty levels 7, 5, 3, and 1.
    

    """
def sum_series(n):
    """
    Design a function for an adaptive learning platform that calculates the total engagement score across multiple difficulty levels of a learning module. Starting from an initial difficulty level, the system needs to generate progressively easier sub-levels by reducing the difficulty by 2 points each time, until reaching the base level (0 or 1). The engagement score for each sub-level is equal to its difficulty rating, and the function should return the sum of all these difficulty ratings. This scoring system helps determine the optimal starting difficulty for new students by analyzing their performance across the full spectrum of difficulty levels. For example, if the initial difficulty is 7, the system would calculate the sum of difficulty levels 7, 5, 3, and 1.
    

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