David bought a 5-gallon container of paint to paint his house. After he finished painting, he had 2 quarts of paint left over. How many quarts of paint did David use?