
    Design a fraud detection algorithm that analyzes a suspicious transaction amount by comparing it against the maximum potential fraud risk, calculated by either taking the transaction amount as-is or breaking it down into smaller portions across different banking channels (half through ATM, one-third via online transfer, quarter via POS, and fifth through mobile payments). The algorithm should recursively evaluate these subdivided amounts and return the maximum risk score using the formula: risk_score = max(risk_score(amount/2) + risk_score(amount/3) + risk_score(amount/4) + risk_score(amount/5), amount).
    

    
def get_max_sum(n):
    """
    Design a fraud detection algorithm that analyzes a suspicious transaction amount by comparing it against the maximum potential fraud risk, calculated by either taking the transaction amount as-is or breaking it down into smaller portions across different banking channels (half through ATM, one-third via online transfer, quarter via POS, and fifth through mobile payments). The algorithm should recursively evaluate these subdivided amounts and return the maximum risk score using the formula: risk_score = max(risk_score(amount/2) + risk_score(amount/3) + risk_score(amount/4) + risk_score(amount/5), amount).
    

    """
def get_max_sum(n):
    """
    Design a fraud detection algorithm that analyzes a suspicious transaction amount by comparing it against the maximum potential fraud risk, calculated by either taking the transaction amount as-is or breaking it down into smaller portions across different banking channels (half through ATM, one-third via online transfer, quarter via POS, and fifth through mobile payments). The algorithm should recursively evaluate these subdivided amounts and return the maximum risk score using the formula: risk_score = max(risk_score(amount/2) + risk_score(amount/3) + risk_score(amount/4) + risk_score(amount/5), amount).
    

    """
    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]