
    Design a fraud detection algorithm that analyzes transaction amounts by comparing the original amount against the sum of potential structured transactions, where structured amounts are calculated as half, one-third, one-fourth, and one-fifth of the original amount. For a given transaction amount n dollars, determine whether the original transaction or the sum of its structured components presents a higher risk score, where the risk score of structured components is calculated recursively using the same analysis pattern.
    

    
def get_max_sum(n):
    """
    Design a fraud detection algorithm that analyzes transaction amounts by comparing the original amount against the sum of potential structured transactions, where structured amounts are calculated as half, one-third, one-fourth, and one-fifth of the original amount. For a given transaction amount n dollars, determine whether the original transaction or the sum of its structured components presents a higher risk score, where the risk score of structured components is calculated recursively using the same analysis pattern.
    

    """
def get_max_sum(n):
    """
    Design a fraud detection algorithm that analyzes transaction amounts by comparing the original amount against the sum of potential structured transactions, where structured amounts are calculated as half, one-third, one-fourth, and one-fifth of the original amount. For a given transaction amount n dollars, determine whether the original transaction or the sum of its structured components presents a higher risk score, where the risk score of structured components is calculated recursively using the same analysis pattern.
    

    """
    res = list()
    res.append(0)
    res.append(1)
    i = 2
    while i < n + 1:
        res.append(max(i, res[int(i / 2)] + res[int(i / 3)] + res[int(i / 4)] + res[int(i / 5)]))
        i = i + 1
    return res[n]