#include<cstdio>
#include<cstring>
#include<iostream>
using namespace std;
int n,ans;
string slime;
int main()
{
	char now='1';
	scanf("%d",&n);
	cin>>slime;
	for(int i=0;i<=n-1;i++)
	{
		if(now!=slime[i]) ans++;
		now=slime[i];
	}
	printf("%d\n",ans);
	return 0;
}