#include <stdio.h>
#include <stdlib.h>
#include <string.h>

int main(void)
{
	long n, i;
	char s[200010][11];
	int kind = 1;
	
	scanf("%ld", &n);
	for (i = 1; i <= n; ++i) {
		scanf("%s", s[i]);
		if (i >= 2)
			if (strcmp(s[i], s[i - 1]) != 0)
				kind++;
	}
	printf("%d", kind);
	return EXIT_SUCCESS;
}
