
    A parking garage needs to calculate its total daily revenue based on a dynamic pricing model where parking rates decrease throughout the day. Starting with a peak-hour rate of n currency units, the price drops by 2 units at fixed intervals until reaching zero or the minimum acceptable price. Each interval maintains its price for an equal duration, and the garage wants to sum up the potential revenue across all these price points. Write a function that calculates the sum of all possible parking rates throughout the day, starting from the maximum rate n and including each subsequent rate after 2-unit decreases, until the rate becomes zero or negative. For example, if the initial rate is 7 units, the function should sum up 7 + 5 + 3 + 1 to determine the total revenue potential across all price intervals.
    

    
def sum_series(n):
    """
    A parking garage needs to calculate its total daily revenue based on a dynamic pricing model where parking rates decrease throughout the day. Starting with a peak-hour rate of n currency units, the price drops by 2 units at fixed intervals until reaching zero or the minimum acceptable price. Each interval maintains its price for an equal duration, and the garage wants to sum up the potential revenue across all these price points. Write a function that calculates the sum of all possible parking rates throughout the day, starting from the maximum rate n and including each subsequent rate after 2-unit decreases, until the rate becomes zero or negative. For example, if the initial rate is 7 units, the function should sum up 7 + 5 + 3 + 1 to determine the total revenue potential across all price intervals.
    

    """
def sum_series(n):
    """
    A parking garage needs to calculate its total daily revenue based on a dynamic pricing model where parking rates decrease throughout the day. Starting with a peak-hour rate of n currency units, the price drops by 2 units at fixed intervals until reaching zero or the minimum acceptable price. Each interval maintains its price for an equal duration, and the garage wants to sum up the potential revenue across all these price points. Write a function that calculates the sum of all possible parking rates throughout the day, starting from the maximum rate n and including each subsequent rate after 2-unit decreases, until the rate becomes zero or negative. For example, if the initial rate is 7 units, the function should sum up 7 + 5 + 3 + 1 to determine the total revenue potential across all price intervals.
    

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