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

int main(){
  int N;
  cin >> N;
  
  vector<string> item(N);
  
  for(int i = 0; i < N; i++){
    string item1;
    cin >> item1;
    item.at(i) = item1;
  }
  
  int cnt = 0;
  int i = 0;
  int j = 1;

  item.erase(unique(item.begin(),item.end()), item.end());
  cout << item.size() << endl;
}
