#include <bits/stdc++.h> using namespace std; int n,s=1; char a[40],t='-'3 ; int main(){ cin>>n; getchar(); for(int i=1;i<=n;i++){ cin>>a[i]; getchar(); if(a[i]!=t) s++,t=a[i]; } cout<<s; return 0; }