A grocery store bought milk for $2.50 per half gallon and stored it in two refrigerators. During the night, one refrigerator malfunctioned and ruined 14 half gallons. If the remaining milk is sold for $3.98 per half gallon, how many half gallons did the store buy if they made a profit of $74.52?