If anyone would be so nice as to assist me in setting the following problem up, it would be greatly appreciated.

A dairy needs 360 gallons of milk containing 4% fat. How many gallons each of 5% and 2% milk is needed to obtain the desired 360 gallons?

I started out with

.05(x) + .02(360-x) = 360 as one of my equations, but am not sure if that is

right. Need a system of equations so that I may solve for one of the variables.