#include <bits/stdc++.h>
int main() {
  int stone, result = 0;
  char rock[50];
  scanf("%d", &stone);
  getchar();
  for (int i = 0; i < stone; i++) {
    scanf("%c", &rock[i]);
  }
  for (int i = 0; i < stone - 1; i++) {
    if (rock[i] == rock[i + 1]) {
      result = result + 1;
    }
  }
  printf("%d", result);
  return 0;
}
