#import <Foundation/Foundation.h>
int main() {
    int n;
    scanf("%d ",&n);
    int ans=0;
    char prev='0';
    for(int i=0;i<n;i++){
        char c = getchar();
        if(prev!=c) ans++;
        prev=c;
    }
    printf("%d\n",ans);
}
