#include <bits/stdc++.h>
using namespace std;

const int N=105;
int n,ans,a[N];

int main()
{
	int i,j,k;
	cin>>n;
	for(i=1;i<=n;i++)
	    cin>>a[i];
	for(i=1;i<=n;i=k)
	{
		j=0,k=i+1;
		while(a[i]==a[k]&&k<=n)
		    k++;
		ans+=(k-i)/2;
	}
	cout<<ans;
	return 0;
}
