#include <bits/stdc++.h>
using namespace std;
string s;
vector<char> a;
int main() {
  int n;
  cin >> n;
  cin >> s;
  int ans = 0;
  for (int i = 0; i < s.length(); i++) {
    if (i > 0 && s[i] == s[i - 1]) ans++;
  }
  cout << ans << endl;
}
