#include <stdio.h>
int main()
{
	int a, b;
	int n;
	scanf("%d", &n);
	scanf("%d", &a);
	int Count=1;
	int i;
	for(i=0; i<n-1; ++i)
	{
		scanf("%d", &b);
		if((a%10)==(b/10))
			++Count;
		a=b;
	}
	printf("%d\n", Count);
	return 0;
}

  

 posted on 2019-11-06 10:42  ComMario  阅读(148)  评论(0编辑  收藏  举报