#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  string s;
  int counter;
  cin >> n >> s;
  if (s.at(0) != s.at(1)) counter++;
  for (int i = 1; i < n - 1; i++) {
    if (s.at(i - 1) == s.at(i) && s.at(i) != s.at(i + 1)) {
      counter++;
    }
  }
  if (s.at(n - 2) != s.at(n - 1)) counter++;
  cout << counter << endl;
}
