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