N = int(input())
S = input()


ans = 0
pre = None
for s in S:
    ans += (pre != s)
    pre = s
print(ans) N = int(input()) N int(input()) int input() input S = input() S input() input ans = 0 ans 0 pre = None pre None for s in S:
    ans += (pre != s)
    pre = s s S ans += (pre != s) ans pre != s pre s pre = s pre s print(ans) print ans ans = 0 0 ans ans += (pre != s) pre != s ans S = input() input() S pre = s s pre N = int(input()) int(input()) N pre = None None pre
N = int(input())
S = input()


ans = 0
pre = None
for s in S:
    ans += (pre != s)
    pre = s
print(ans)
