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

int main(){
  int n;
  scanf("%d", &n);
  char s[n][10] = {0};
  for(int i = 0; i < n; i++){
    scanf("%s", &s[i]);
  }
  
  char tmp[10] = {0};
  strcpy(tmp, s[0]);
  int count = 1;
  for(int j = 0; j < n; j++){
    if(strcmp(s[j], tmp) != 0){
      count++;
    }
  }
  
  printf("%d", count);
  return 0;
}
  
  