
    Design a function that calculates the total educational value of a personalized learning path starting from an initial difficulty level. The learning path breaks down complex topics into progressively easier sub-modules by reducing the difficulty rating by 2 points at each step until reaching a baseline level. For a given initial difficulty rating, the function should sum up the difficulty levels of all sub-modules in the path (including the initial level), continuing until the adjusted difficulty would become zero or negative. The resulting sum represents the cumulative learning value of the entire personalized path, accounting for both challenging and simplified versions of the content. This adaptive approach ensures that students can engage with the material at multiple levels of complexity while maintaining a structured progression toward mastery.
    

    
def sum_series(n):
    """
    Design a function that calculates the total educational value of a personalized learning path starting from an initial difficulty level. The learning path breaks down complex topics into progressively easier sub-modules by reducing the difficulty rating by 2 points at each step until reaching a baseline level. For a given initial difficulty rating, the function should sum up the difficulty levels of all sub-modules in the path (including the initial level), continuing until the adjusted difficulty would become zero or negative. The resulting sum represents the cumulative learning value of the entire personalized path, accounting for both challenging and simplified versions of the content. This adaptive approach ensures that students can engage with the material at multiple levels of complexity while maintaining a structured progression toward mastery.
    

    """
def sum_series(n):
    """
    Design a function that calculates the total educational value of a personalized learning path starting from an initial difficulty level. The learning path breaks down complex topics into progressively easier sub-modules by reducing the difficulty rating by 2 points at each step until reaching a baseline level. For a given initial difficulty rating, the function should sum up the difficulty levels of all sub-modules in the path (including the initial level), continuing until the adjusted difficulty would become zero or negative. The resulting sum represents the cumulative learning value of the entire personalized path, accounting for both challenging and simplified versions of the content. This adaptive approach ensures that students can engage with the material at multiple levels of complexity while maintaining a structured progression toward mastery.
    

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