#include using namespace std; using ll = long long; #define ALL(v) v.begin(),v.end() #define dbg(x) cerr << #x << ": " << (x) << endl; int N; string S; int main() { cin >> N >> S; S = '#' + S + '#'; int ans = 0; for (int i = 1; i < S.size(); ++i) { if (S[i-1] != S[i]) ++ans; } cout << ans-1 << '\n'; }