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