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