See the image for the full explanation.
Edit: I see you copied the total dollar cost incorrectly from the image to the question now that I look at it. This provides the perfect opportunity for you to try to get the correct answer using the methodology I described!
(Hint: The answer is actually 15)