
    Design a function for a social event recommendation system that calculates the total relevance score of filtered event suggestions. Starting with an initial number of event matches, the system applies increasingly strict social and interest-based filters, removing pairs of events at each step until no valid matches remain. For each filtering round, the remaining events contribute a relevance score equal to the number of events left, and these scores must be summed to produce the final recommendation strength. The filtering process removes two events at a time, continuing until either no events remain or only one final highly-relevant event is left. This cumulative score helps determine how well the overall recommendation set matches the user's social network and interests.
    

    
def sum_series(n):
    """
    Design a function for a social event recommendation system that calculates the total relevance score of filtered event suggestions. Starting with an initial number of event matches, the system applies increasingly strict social and interest-based filters, removing pairs of events at each step until no valid matches remain. For each filtering round, the remaining events contribute a relevance score equal to the number of events left, and these scores must be summed to produce the final recommendation strength. The filtering process removes two events at a time, continuing until either no events remain or only one final highly-relevant event is left. This cumulative score helps determine how well the overall recommendation set matches the user's social network and interests.
    

    """
def sum_series(n):
    """
    Design a function for a social event recommendation system that calculates the total relevance score of filtered event suggestions. Starting with an initial number of event matches, the system applies increasingly strict social and interest-based filters, removing pairs of events at each step until no valid matches remain. For each filtering round, the remaining events contribute a relevance score equal to the number of events left, and these scores must be summed to produce the final recommendation strength. The filtering process removes two events at a time, continuing until either no events remain or only one final highly-relevant event is left. This cumulative score helps determine how well the overall recommendation set matches the user's social network and interests.
    

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