total manufacturing cost formula