piles array into a max heap.k times:
a. Extract the maximum element from the heap.
b. Calculate the number of stones to remove (floor(piles[i] / 2)).
c. Subtract the number of stones removed from the extracted element.
d. Push the updated number of stones back into the heap.k operations, sum up all the elements in the heap to get the total number of remaining stones.