#include <iostream>
using namespace std;
int RemoveDuplicateElement(int arr[], int length)
{
int count = 0;
if (length == 0)
return count;
++count;
for (int i = 1; i < length; ++i)
{
if (arr[i] != arr[i - 1])
{
++count;
}
}
return count;
}
int main()
{
int arr[] = { 1, 1, 2, 2, 3, 3, 4 };
cout << RemoveDuplicateElement(arr, 7);
}