
    A delivery company needs to calculate the total number of viable delivery routes during peak traffic hours. Starting with an initial number of routes from the central hub, the system eliminates pairs of routes as traffic conditions worsen. For each iteration, two routes become non-viable due to increased congestion, and this process continues until no feasible routes remain. Write a function that calculates the sum of available routes at each stage of this elimination process, where each stage removes two routes from consideration. This sum will help dispatchers understand the total routing options available across all traffic conditions, from optimal to heavily congested scenarios.
    

    
def sum_series(n):
    """
    A delivery company needs to calculate the total number of viable delivery routes during peak traffic hours. Starting with an initial number of routes from the central hub, the system eliminates pairs of routes as traffic conditions worsen. For each iteration, two routes become non-viable due to increased congestion, and this process continues until no feasible routes remain. Write a function that calculates the sum of available routes at each stage of this elimination process, where each stage removes two routes from consideration. This sum will help dispatchers understand the total routing options available across all traffic conditions, from optimal to heavily congested scenarios.
    

    """
def sum_series(n):
    """
    A delivery company needs to calculate the total number of viable delivery routes during peak traffic hours. Starting with an initial number of routes from the central hub, the system eliminates pairs of routes as traffic conditions worsen. For each iteration, two routes become non-viable due to increased congestion, and this process continues until no feasible routes remain. Write a function that calculates the sum of available routes at each stage of this elimination process, where each stage removes two routes from consideration. This sum will help dispatchers understand the total routing options available across all traffic conditions, from optimal to heavily congested scenarios.
    

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