
    A delivery company needs to calculate the total number of deliveries possible across multiple zones when vehicles are assigned in decreasing pairs. Starting with n vehicles, each subsequent zone receives 2 fewer vehicles than the previous zone (n, n-2, n-4, etc.) until no more vehicles can be assigned (when remaining vehicles ≤ 0). The company needs a function that calculates the sum of all vehicle assignments across these zones to determine total delivery capacity. For example, if starting with 7 vehicles, the zones would receive 7, 5, 3, 1 vehicles respectively, and the function should return their sum. The calculation must follow this pattern of decreasing pairs until no more valid assignments can be made.
    

    
def sum_series(n):
    """
    A delivery company needs to calculate the total number of deliveries possible across multiple zones when vehicles are assigned in decreasing pairs. Starting with n vehicles, each subsequent zone receives 2 fewer vehicles than the previous zone (n, n-2, n-4, etc.) until no more vehicles can be assigned (when remaining vehicles ≤ 0). The company needs a function that calculates the sum of all vehicle assignments across these zones to determine total delivery capacity. For example, if starting with 7 vehicles, the zones would receive 7, 5, 3, 1 vehicles respectively, and the function should return their sum. The calculation must follow this pattern of decreasing pairs until no more valid assignments can be made.
    

    """
def sum_series(n):
    """
    A delivery company needs to calculate the total number of deliveries possible across multiple zones when vehicles are assigned in decreasing pairs. Starting with n vehicles, each subsequent zone receives 2 fewer vehicles than the previous zone (n, n-2, n-4, etc.) until no more vehicles can be assigned (when remaining vehicles ≤ 0). The company needs a function that calculates the sum of all vehicle assignments across these zones to determine total delivery capacity. For example, if starting with 7 vehicles, the zones would receive 7, 5, 3, 1 vehicles respectively, and the function should return their sum. The calculation must follow this pattern of decreasing pairs until no more valid assignments can be made.
    

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