Input: [1, 1, 2, 3, 3, 4, 4, 5, 5] Output: 2
Input: [1, 1, 2, 3, 3, 4, 4, 5, 5]
Output: 2