n = int(input()) s = input() MOD = 10**9+7 ans = 0 last = "A" for i in range(n): if s[i] == last: ans += 1 last = s[i] print(ans)