MATLAB: Given a set of numers how many of them should I use for an specific result

permssymbolicSymbolic Math Toolboxvector

For example, I have 3 and -4 and I need to know how many 3s and -4s I need to get 22 as result
I already know the answer. But I need to know how to generate it on matlab
[ 3 3 3 3 3 3 3 3 3 3 -4 -4] the sum of the elements is equal to 22
I had to use ten 3s and two -4