You are given an array of integers. In a single operation, you can choose the longest contiguous subarray consisting of identical elements and delete it.
If there are multiple subarrays of the same maximum length, you must delete the leftmost one.
After a subarray is deleted, the remaining elements on the left and right side (if any) are concatenated together. This means previously separated elements might become adjacent and form a new, longer contiguous subarray of identical elements.
Return the total number of operations required to completely empty the array.
Print a single integer representing the total number of deletion operations required to empty the array.