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