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