Let's consider a set of distinct positive integers with a sum equal to 2023. Among these integers, there are a total of $d$ even numbers and $m$ odd numbers. Determine the maximum possible value of $2d + 4m$.

Let's think step by step and output the final answer within \boxed{}.
user