
    In a hospital's medication safety system, develop a function that calculates the total number of drug interaction checks needed when screening a patient's prescription list. Given n active medications, each medication must be cross-checked against a diminishing subset of the remaining medications, where each subsequent check examines two fewer medications than the previous round. The system should sum up the number of checks starting with n medications, then (n-2) medications, continuing until no medications remain to be checked (n-x ≤ 0). This calculation helps healthcare providers estimate the computational resources needed for thorough drug interaction screening and ensures comprehensive coverage of all potential medication conflicts.
    

    
def sum_series(n):
    """
    In a hospital's medication safety system, develop a function that calculates the total number of drug interaction checks needed when screening a patient's prescription list. Given n active medications, each medication must be cross-checked against a diminishing subset of the remaining medications, where each subsequent check examines two fewer medications than the previous round. The system should sum up the number of checks starting with n medications, then (n-2) medications, continuing until no medications remain to be checked (n-x ≤ 0). This calculation helps healthcare providers estimate the computational resources needed for thorough drug interaction screening and ensures comprehensive coverage of all potential medication conflicts.
    

    """
def sum_series(n):
    """
    In a hospital's medication safety system, develop a function that calculates the total number of drug interaction checks needed when screening a patient's prescription list. Given n active medications, each medication must be cross-checked against a diminishing subset of the remaining medications, where each subsequent check examines two fewer medications than the previous round. The system should sum up the number of checks starting with n medications, then (n-2) medications, continuing until no medications remain to be checked (n-x ≤ 0). This calculation helps healthcare providers estimate the computational resources needed for thorough drug interaction screening and ensures comprehensive coverage of all potential medication conflicts.
    

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