
    Design a function for a personalized savings plan calculator that helps clients reach their financial goals through a decreasing contribution strategy. Starting with an initial savings target, the calculator determines the sum of all planned monthly contributions, where each subsequent contribution decreases by $2,000 from the previous amount until the contribution would become zero or negative. For example, if a client's initial target is $10,000, the calculator would sum up the contribution series: $10,000, $8,000, $6,000, $4,000, $2,000. This stepped-down approach allows clients to start with higher contributions when motivation is strongest and gradually reduce their savings commitment over time while still working toward their overall goal.
    

    
def sum_series(n):
    """
    Design a function for a personalized savings plan calculator that helps clients reach their financial goals through a decreasing contribution strategy. Starting with an initial savings target, the calculator determines the sum of all planned monthly contributions, where each subsequent contribution decreases by $2,000 from the previous amount until the contribution would become zero or negative. For example, if a client's initial target is $10,000, the calculator would sum up the contribution series: $10,000, $8,000, $6,000, $4,000, $2,000. This stepped-down approach allows clients to start with higher contributions when motivation is strongest and gradually reduce their savings commitment over time while still working toward their overall goal.
    

    """
def sum_series(n):
    """
    Design a function for a personalized savings plan calculator that helps clients reach their financial goals through a decreasing contribution strategy. Starting with an initial savings target, the calculator determines the sum of all planned monthly contributions, where each subsequent contribution decreases by $2,000 from the previous amount until the contribution would become zero or negative. For example, if a client's initial target is $10,000, the calculator would sum up the contribution series: $10,000, $8,000, $6,000, $4,000, $2,000. This stepped-down approach allows clients to start with higher contributions when motivation is strongest and gradually reduce their savings commitment over time while still working toward their overall goal.
    

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