#include <iostream>
using namespace std;
int n, ans;
bool flag[270];
struct S {
char c;
int vs () {
return c - 'A';
}
char& operator ->(){
return c;
}
void read() {
cin >> c;
}
bool& operator !=(S i) {
bool f = c != i.c;
return f;
}
}b;
int main() {
cin >> n;
for (int i = 0; i < n; i++) {
S a;
a.read();
if (b != a) {
ans++, b = a;
}
}
cout << ans + 1 << endl;
return 0;
}