#include <bits/stdc++.h>
using namespace std;
struct RTC {};
int n;
char s[123];
int main() {
  scanf("%d", &n);
  scanf("%s", s);
  int cut = 0;
  for (int i = 1; i < n; i++)
    if (s[i] == s[i - 1]) cut++;
  printf("%d\n", cut);
  return 0;
}
