#include <bits/stdc++.h>
    
using namespace std;
    
#define endl "\n"
#define ll unsigned long long
#define int long long int
#define vi vector <int >
#define vii vector < pii >
#define vvi vector < vector < int >  >
#define vll vector <ll >
#define pii pair <int, int>
#define pdd pair< double, double>
#define piii pair < pii, int > 
#define pll pair<ll, ll >
#define umap unordered_map
#define pb push_back
#define pq priority_queue
#define forn(i, n) for(int i = 0; i < (int)n; i++)
#define fore(i,c) for(int i = 1; i <= (int)c; i++)
#define rep(i,b,c) for(int i = (int)b; i < (int)c; i++)
// #define double long double
// #define a first
// #define b second

int32_t main(){
    ios::sync_with_stdio(0),cin.tie(0);

    int n;
    string s;
    cin >> n >> s;
    rep(i, 1, s.length()){
        if(s[i] == s[i - 1])
            n--;
    }
    cout << n << endl;

  
    return 0;
}
