How to calculate raw materials used in production