To create a unique house paint color, Melton mixes together a sample that is 12 gallons of red, 2.5 gallons of yellow and 0.5 gallons of blue paint. He then mixes a main batch of paint using 30 gallons of yellow paint and enough red and blue paint to maintain the original ratio. How many total gallons of paint did he use to make the main batch of paint?