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