def regular_op(stack: list, num: int) -> list:
    """return the stack after performing a regular math operation"""
    while stack:
        if stack[-1] == '(':
            break
        operator, left_operand = stack[-1], stack[-2]
        stack = stack[:-2]
        if operator == '+':
            num = left_operand + num
        elif operator == '*':
            num = left_operand * num
    stack.append(num)
    return stack