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