calculation of capital of the factory