N = int(input())
S = input()
pre = S[0]
ans = 1

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

for s in S:
    if pre != s:
        ans += 1
    pre = s
print(ans)