
    Design a function that helps determine the total amount of compatible periodic deposit options (common divisors) that would work for both a customer's primary savings goal of $a and secondary savings goal of $b, enabling efficient dual-goal financial planning. This calculation will help financial advisors recommend deposit schedules that simultaneously progress towards both financial milestones.
    

    
def sum(a, b):
    """
    Design a function that helps determine the total amount of compatible periodic deposit options (common divisors) that would work for both a customer's primary savings goal of $a and secondary savings goal of $b, enabling efficient dual-goal financial planning. This calculation will help financial advisors recommend deposit schedules that simultaneously progress towards both financial milestones.
    

    """
def sum(a, b):
    """
    Design a function that helps determine the total amount of compatible periodic deposit options (common divisors) that would work for both a customer's primary savings goal of $a and secondary savings goal of $b, enabling efficient dual-goal financial planning. This calculation will help financial advisors recommend deposit schedules that simultaneously progress towards both financial milestones.
    

    """
    sum = 0
    for i in range(1, min(a, b)):
        if a % i == 0 and b % i == 0:
            sum += i
    return sum