#include <bits/stdc++.h>
int main(int argc, char const *argv[]) {
  int n, count = 0, i;
  char s[100];
  scanf("%d", &n);
  scanf("%s", s);
  for (i = 0; i < n; ++i) {
    if (s[i] == s[i + 1]) {
      count++;
    }
  }
  printf("%d", count);
  return 0;
}
