Alice chooses a set $\mathcal{A}$ of positive integers. Then Bob lists all finite nonempty sets $\mathcal{B}$ of positive integers with the property that the maximum element of $\mathcal{B}$ belongs to $\mathcal{A}$. Bob's list has $2024$ sets. Find the sum of the elements of $\mathcal{A}$.