Weighted Average Cost Flow Formula