×××
Every one of those unit fractions has an equal numerator and denominator,
so quantity-wise they are all equal to 1. In each unit fraction we pick
which one is to go on the denominator as the one which will cancel with a
unit in the preceding numerator. I have abbreviated half-pints as "hfpt".
Cancel the gallons:
×××
Cancel the quarts:
×××
Cancel the pints:
×××
All we have left is
×××
304 half pints.
Edwin