#include<iostream>
using namespace std;
int main(){
    int n,l=1;
    cin>>n;
    char a,b;
    for(int i=0;i<n;i++){
        cin>>a;
        if(i)if(b!=a)l++;
        b=a;
    }
    cout<<l<<endl;
}