
    Design a risk assessment function for a bank's fraud detection system that evaluates the cumulative risk score of a transaction across multiple security checkpoints. Starting with an initial risk score, the system needs to calculate the sum of decreasing risk levels, where each checkpoint reduces the initial score by 2 points until the score reaches zero or becomes negative. The function should aggregate these sequential risk scores to determine the overall transaction risk profile, helping identify potential fraudulent activities based on the total risk assessment value. For example, if a transaction starts with a risk score of 7, the system would evaluate: 7 + 5 + 3 + 1, providing a comprehensive risk evaluation across all security checkpoints. This graduated risk assessment helps maintain security while minimizing false positives in fraud detection.
    

    
def sum_series(n):
    """
    Design a risk assessment function for a bank's fraud detection system that evaluates the cumulative risk score of a transaction across multiple security checkpoints. Starting with an initial risk score, the system needs to calculate the sum of decreasing risk levels, where each checkpoint reduces the initial score by 2 points until the score reaches zero or becomes negative. The function should aggregate these sequential risk scores to determine the overall transaction risk profile, helping identify potential fraudulent activities based on the total risk assessment value. For example, if a transaction starts with a risk score of 7, the system would evaluate: 7 + 5 + 3 + 1, providing a comprehensive risk evaluation across all security checkpoints. This graduated risk assessment helps maintain security while minimizing false positives in fraud detection.
    

    """
def sum_series(n):
    """
    Design a risk assessment function for a bank's fraud detection system that evaluates the cumulative risk score of a transaction across multiple security checkpoints. Starting with an initial risk score, the system needs to calculate the sum of decreasing risk levels, where each checkpoint reduces the initial score by 2 points until the score reaches zero or becomes negative. The function should aggregate these sequential risk scores to determine the overall transaction risk profile, helping identify potential fraudulent activities based on the total risk assessment value. For example, if a transaction starts with a risk score of 7, the system would evaluate: 7 + 5 + 3 + 1, providing a comprehensive risk evaluation across all security checkpoints. This graduated risk assessment helps maintain security while minimizing false positives in fraud detection.
    

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