#include <bits/stdc++.h>
#define el endl
using namespace std;
void input()
{
if (fopen("in.txt", "r"))
{
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
}
}
int main()
{
input();
int n;
cin >> n;
string s;
cin >> s;
int count = 1;
for (int i = 1; i < n; i++)
{
if (s[i] != s[i - 1])
count++;
}
cout << count << el;
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgZWwgZW5kbAp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKdm9pZCBpbnB1dCgpCnsKICAgIGlmIChmb3BlbigiaW4udHh0IiwgInIiKSkKICAgIHsKICAgICAgICBmcmVvcGVuKCJpbi50eHQiLCAiciIsIHN0ZGluKTsKICAgICAgICBmcmVvcGVuKCJvdXQudHh0IiwgInciLCBzdGRvdXQpOwogICAgfQp9CgppbnQgbWFpbigpCnsKICAgIGlucHV0KCk7CgogICAgaW50IG47CiAgICBjaW4gPj4gbjsKICAgIHN0cmluZyBzOwogICAgY2luID4+IHM7CgogICAgaW50IGNvdW50ID0gMTsKICAgIGZvciAoaW50IGkgPSAxOyBpIDwgbjsgaSsrKQogICAgewogICAgICAgIGlmIChzW2ldICE9IHNbaSAtIDFdKQogICAgICAgICAgICBjb3VudCsrOwogICAgfQogICAgY291dCA8PCBjb3VudCA8PCBlbDsKCiAgICByZXR1cm4gMDsKfQ==