Given a sorted array, return the minimum number of operations to convert the array so that elements are equal.