For a \( 3 \times 3 \) matrix \( M \), let \( \text{trace}(M) \) denote the sum of all the diagonal elements of \( M \). Let \( A \) be a \( 3 \times 3 \) matrix such that \( |A| = \frac{1}{2} \) and \( \text{trace}(A) = 3 \). If \( B = \operatorname{adj}(\operatorname{adj}(2A)) \), then the value of \( |B| + \text{trace}(B) \) equals: