#include <bits/stdc++.h>
using namespace std;
int main()
{
ios_base::sync_with_stdio(false);
cin.tie(0);
int t;
cin >> t;
string s;
cin >> s;
int ctr = 0;
for (int i = 1; i < t; i++)
{
if (s[i] == s[i - 1])
{
ctr++;
}
}
cout << ctr;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpCnsKICAgIGlvc19iYXNlOjpzeW5jX3dpdGhfc3RkaW8oZmFsc2UpOwogICAgY2luLnRpZSgwKTsKCiAgICBpbnQgdDsKICAgIGNpbiA+PiB0OwoKICAgIHN0cmluZyBzOwogICAgY2luID4+IHM7CgogICAgaW50IGN0ciA9IDA7CgogICAgZm9yIChpbnQgaSA9IDE7IGkgPCB0OyBpKyspCiAgICB7CiAgICAgICAgaWYgKHNbaV0gPT0gc1tpIC0gMV0pCiAgICAgICAgewogICAgICAgICAgICBjdHIrKzsKICAgICAgICB9CiAgICB9CiAgICBjb3V0IDw8IGN0cjsKfQ==