
    Design a function for an event recommendation system that calculates the total relevance score across different priority levels of local events. Starting with the highest priority level containing n events, each subsequent level contains 2 fewer events than the previous one, continuing until no more events can be included. The system assigns higher weights to events that closely match user interests and social connections, with the weight decreasing by 2 for each priority level. The function should compute the sum of these weighted recommendations (n - 2i) for each level i, from the top level (i=0) down to the last possible level, where the number of events in a level cannot be negative.
    

    
def sum_series(n):
    """
    Design a function for an event recommendation system that calculates the total relevance score across different priority levels of local events. Starting with the highest priority level containing n events, each subsequent level contains 2 fewer events than the previous one, continuing until no more events can be included. The system assigns higher weights to events that closely match user interests and social connections, with the weight decreasing by 2 for each priority level. The function should compute the sum of these weighted recommendations (n - 2i) for each level i, from the top level (i=0) down to the last possible level, where the number of events in a level cannot be negative.
    

    """
def sum_series(n):
    """
    Design a function for an event recommendation system that calculates the total relevance score across different priority levels of local events. Starting with the highest priority level containing n events, each subsequent level contains 2 fewer events than the previous one, continuing until no more events can be included. The system assigns higher weights to events that closely match user interests and social connections, with the weight decreasing by 2 for each priority level. The function should compute the sum of these weighted recommendations (n - 2i) for each level i, from the top level (i=0) down to the last possible level, where the number of events in a level cannot be negative.
    

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