/*
 
 
  author:@Doremonn
  created on :18/10/2019
 
 Note : Modular Exponentiation , nCrModPFermats code are from gfg
 DSU , BFS , DFS codes are from hackerearth
 
 
*/
#include <bits/stdc++.h>
using namespace std;
 
typedef long long int ll;

vector<ll> adj[1000001]; 

ll i;
#define mod 1000000007
#define pb push_back
#define endl cout<<"\n";
#define prt1(a) cout<<a<<" "
#define prt2(a,b) cout<<a<<" "<<b<<" "
#define prt3(a,b,c) cout<<a<<" "<<b<<" "<<c<<" "
#define rep(i,st,end) for( i=st;i<end;i++)
#define repv(i,st,end) for( i=st;i>=end;i--)
#define fio ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL)

//********** Modular Exponentiation *******************
// call using power (x,y,p)    to cal  (x^y)%p
int power(ll x, ll y,ll p) 
{ 
  
    int res = 1;      // Initialize result 
  
    x = x % p;  // Update x if it is more than or  
                // equal to p 
  
    while (y > 0) 
    { 
        // If y is odd, multiply x with result 
        if (y & 1) 
            res = (res*x) % p; 
  
        // y must be even now 
        y = y>>1; // y = y/2 
        x = (x*x) % p;   
    } 
    return res; 
} 
// ******************* nCr mod p ( fermats )***************************
// call using nCrModPFermat(n, r, p)    nCr % p

ll modInverse(ll n, ll p) 
{ 
    return power(n, p-2, p); 
} 
  
// Returns nCr % p using Fermat's little 
// theorem. 
int nCrModPFermat(int n, int r, int p) 
{ 
   // Base case 
   if (r==0) 
      return 1; 
  
    // Fill factorial array so that we 
    // can find all factorial of r, n 
    // and n-r 
    int fac[n+1]; 
    fac[0] = 1; 
    for (int i=1 ; i<=n; i++) 
        fac[i] = fac[i-1]*i%p; 
  
    return (fac[n]* modInverse(fac[r], p) % p * 
            modInverse(fac[n-r], p) % p) % p; 
} 

// ************ DSU  *******************

// to find root  call using root(arr,element)

int root (int Arr[ ] ,int i)
{
    while(Arr[ i ] != i)
    {
        Arr[ i ] = Arr[ Arr[ i ] ] ; 
i = Arr[ i ]; 
    }
return i;
}

  // to do union  initilize size[] by 1 
void weighted_union(int Arr[ ],int size[ ],int A,int B)
{
    int root_A = root(Arr,A);
    int root_B = root(Arr,B);
    if(size[root_A] < size[root_B ])
    {
Arr[ root_A ] = Arr[root_B];
size[root_B] += size[root_A];
}
    else
    {
Arr[ root_B ] = Arr[root_A];
size[root_A] += size[root_B];
}

}

//******************** DFS ***********************

void dfs(ll v , bool visited[])
 {
        visited[v] = true;
    for(auto it:adj[v])
        {
         if(!visited[it])
             dfs(it,visited);
        }
}
//************** BFS ***************************
void bfs(ll v,bool visited[]) 
{
        queue <ll> q;
        q.push(v);
        visited[v] = true;
        while(!q.empty())
        {
            ll p = q.front();
            q.pop();
            for(auto it : adj[p])
            {
                if(!visited[it])
                {             
                     q.push(it);
                     visited[it] = true;
                }
            }
        }
    }
//**************   Cycle in Directed Graph *****************

bool findLoop(ll v,bool visited[]) 
{
  if(visited[v]==1)
    return 1;
  if(visited[v]==2)
    return 0;
  visited[v]=1;
  for(auto it:adj[v])
  {
    if(findLoop(it,visited))
      return 1;
  }
  visited[v]=2;
  return 0;
}

bool checkLoop(ll start ,ll end,bool visited[])     
{
  //  1  based  indexing 
  for(ll i=start;i<end;i++)    // for(i=1;i<=n;i++)
  {
    if(!visited[i] && findLoop(i,visited))
      return 1;
  }
  return 0;
}

//******************************* CODE BEGINS FROM HERE   ****************************
//*************************************************************************************





struct Data 
{
  ll l;
  ll r;
  ll v;
};

bool comp(Data A,Data B )
{
  return A.r<B.r ;     // sort acc to first in ascending order 
}

 

int main(){
    ll tc,n,m,k,l,i;
    
  //  cin>>tc;
    tc=1;
   ll a,b;
    while(tc--)
    {
      cin>>l;
      string na;
      cin>>na;
      ll c=0;
      rep(i,1,l+1)
      {
        if(na[i]!=na[i-1])
          c++;

      }
      prt1(c);

      }
    return 0;
} 
// 2 3 6 10
// 0 2 5 11








Measured memory_bytes: 23936