#include <bits/stdc++.h>
int main() {
  int n, l, i, count = 0;
  scanf("%d", &n);
  char str[51];
  scanf("%s", str);
  l = strlen(str);
  for (i = 0; i < l; i++) {
    if (str[i] == str[i + 1])
      count++;
    else
      count;
  }
  printf("%d", count);
}
