How would one proceed in their thought process when trying to solve what appears to be a standard stars and bars equation, with $x_i\geqslant$ 0, e.g.
$$x_1+x_2+x_3+x_4=24$$
Except, let's say that there is a restriction that two of the variables must be equal. We can write the equation as such:
$$x_1+x_2+2x_3=24$$
At first, I tried substituting $2x_3$ with $y$, and solving for
$$x_1+x_2+y=24$$
using the standard stars and bars method. However, that would result in over counting, because it does not account for restrictions on $y$, since $y$ has to be even.
Any suggestions on how to solve this sort of problem?
EDIT:
I realize that you can solve smaller numbers using cases, but what would be the approach if you had larger numbers (making it impractical to use cases)? e.g. $$x_1+x_2+x_3+x_4+2x_5=350$$