The corporation shall set apart as an earned surplus all of its net earnings in each and every year until such earned surplus shall equal the total of the paid-in capital and paid-in surplus then outstanding. The earned surplus shall be held in a depository, invested in United States government bonds, or as provided in such corporation's bylaws, and shall be kept and used to meet losses and contingencies of such corporation and, whenever the amount of earned surplus shall become impaired, it shall be built up again to the required amount in the manner provided for its original accumulation.