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

int main(){
  long long n;
  char s[200001][11]={0}, c[11];
  int b[2000001]={0}, ans=0;
  scanf("%lld", &n);
  for(long long i=0; i<n; i++){
  	scanf("%s", c);
    if(b[i]==1&&strcmp(s, c[i])==0){
      continue;
    }
    else if(b[i]==0){
      strcpy(s[i],c);
      ans++;
      b[i]++;
    }
  }
  printf("%d\n", ans);

}