The cost of a bag of apples is based on the cost of one apple and the total number of apples in the bag.