
    Given a sequence of transaction amounts from multiple accounts, find the highest possible total monetary impact by identifying a pattern where each subsequent transaction is larger than the previous one and multiplying these transaction values together. This calculation helps detect potential money laundering schemes where perpetrators systematically increase transaction amounts across different accounts to avoid detection.
    

    
def max_product(arr):
    """
    Given a sequence of transaction amounts from multiple accounts, find the highest possible total monetary impact by identifying a pattern where each subsequent transaction is larger than the previous one and multiplying these transaction values together. This calculation helps detect potential money laundering schemes where perpetrators systematically increase transaction amounts across different accounts to avoid detection.
    

    """
def max_product(arr):
    """
    Given a sequence of transaction amounts from multiple accounts, find the highest possible total monetary impact by identifying a pattern where each subsequent transaction is larger than the previous one and multiplying these transaction values together. This calculation helps detect potential money laundering schemes where perpetrators systematically increase transaction amounts across different accounts to avoid detection.
    

    """
    n = len(arr)
    mpis = arr[:]
    for i in range(n):
        current_prod = arr[i]
        j = i + 1
        while j < n:
            if arr[j - 1] > arr[j]:
                break
            current_prod *= arr[j]
            if current_prod > mpis[j]:
                mpis[j] = current_prod
            j = j + 1
    return max(mpis)