
    Design a function for a social event recommendation system that calculates the total relevance score of the most promising events for a user. Given an initial number of matched events, the system needs to evaluate only the top half of events, where each subsequent event's relevance decreases by 2 points from the previous one. The calculation should sum up these decreasing relevance scores, starting from the highest score (equal to the total number of matches) and continuing until reaching the halfway point of the event list. This scoring system helps prioritize the most relevant events while accounting for diminishing returns in relevance as more events are considered. The final sum represents the cumulative relevance score that determines the strength of the recommendation set for the user.
    

    
def sum_series(n):
    """
    Design a function for a social event recommendation system that calculates the total relevance score of the most promising events for a user. Given an initial number of matched events, the system needs to evaluate only the top half of events, where each subsequent event's relevance decreases by 2 points from the previous one. The calculation should sum up these decreasing relevance scores, starting from the highest score (equal to the total number of matches) and continuing until reaching the halfway point of the event list. This scoring system helps prioritize the most relevant events while accounting for diminishing returns in relevance as more events are considered. The final sum represents the cumulative relevance score that determines the strength of the recommendation set for the user.
    

    """
def sum_series(n):
    """
    Design a function for a social event recommendation system that calculates the total relevance score of the most promising events for a user. Given an initial number of matched events, the system needs to evaluate only the top half of events, where each subsequent event's relevance decreases by 2 points from the previous one. The calculation should sum up these decreasing relevance scores, starting from the highest score (equal to the total number of matches) and continuing until reaching the halfway point of the event list. This scoring system helps prioritize the most relevant events while accounting for diminishing returns in relevance as more events are considered. The final sum represents the cumulative relevance score that determines the strength of the recommendation set for the user.
    

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