
    A transit authority needs to calculate the total passenger capacity needed for a bus route based on historical ridership patterns. Given the total number of scheduled stops on a route, the passenger load typically decreases by 2 passengers per stop for the first half of the journey. Calculate the sum of expected passengers at each stop for the first half of the route, where the initial passenger count equals the total number of stops, and it decreases by 2 after each stop. The calculation should continue until there are no more passengers or the midpoint of the route is reached, whichever comes first. This passenger load calculation helps determine the optimal bus size needed for the route.
    

    
def sum_series(n):
    """
    A transit authority needs to calculate the total passenger capacity needed for a bus route based on historical ridership patterns. Given the total number of scheduled stops on a route, the passenger load typically decreases by 2 passengers per stop for the first half of the journey. Calculate the sum of expected passengers at each stop for the first half of the route, where the initial passenger count equals the total number of stops, and it decreases by 2 after each stop. The calculation should continue until there are no more passengers or the midpoint of the route is reached, whichever comes first. This passenger load calculation helps determine the optimal bus size needed for the route.
    

    """
def sum_series(n):
    """
    A transit authority needs to calculate the total passenger capacity needed for a bus route based on historical ridership patterns. Given the total number of scheduled stops on a route, the passenger load typically decreases by 2 passengers per stop for the first half of the journey. Calculate the sum of expected passengers at each stop for the first half of the route, where the initial passenger count equals the total number of stops, and it decreases by 2 after each stop. The calculation should continue until there are no more passengers or the midpoint of the route is reached, whichever comes first. This passenger load calculation helps determine the optimal bus size needed for the route.
    

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