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