how to calculate cost of li ne production in mining