Mary bought a soft drink for 2 dollars and 7 candy bars. She spent a total of 30 dollars. How much did each candy bar cost?