Just looking at the total amount of combinations, including repeats, take the number of elements in each category and multiply them together. So if there are five elements in a, 4 in b and 2 in c the total possibilities are 5*4*2=40. Now the only problem is if we have repeats we need to remove them from the list. If (a*b*2)=D could be made from more than one combination of elements we would subtract from 40, but from a quick glance I don't see any repeats.