#include <bits/stdc++.h>
using namespace std;
int main() {
  int maloshkosomlazma;
  string x;
  cin >> maloshkosomlazma >> x;
  int res = 0;
  for (int i = 0; i < x.length() - 1; i++) {
    if (x[i] == x[i + 1]) {
      res++;
    }
  }
  cout << res;
}
