Update product stock on a loop

Hi I try, to update the stock in a cart from a loop. but it replace the value instead of calculating the stock - the qty of the cart. How can I pull the stock of the product in the update ?