#include <bits/stdc++.h>
using namespace std;
int main(int argc, char const *argv[]) {
  int n;
  string str;
  int i, count = 0;
  cin >> n >> str;
  for (i = 0; i < n - 1; i++) {
    if (str[i] == str[i + 1]) count++;
  }
  cout << count;
  return 0;
}
