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