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