N = int(input()) S = input() ans = 0 pre = "" for i in range(N): if S[i] != pre: ans += 1 pre = S[i] print(ans)