n = int(input())
s = input()
cnt = 0
for i in range(len(s) - 1):
    if s[i + 1] == s[i]:
        pass
    else:
        cnt += 1
print(cnt + 1) n = int(input()) n int(input()) int input() input s = input() s input() input cnt = 0 cnt 0 for i in range(len(s) - 1):
    if s[i + 1] == s[i]:
        pass
    else:
        cnt += 1 i range(len(s) - 1) range len(s) - 1 len(s) len s 1 if s[i + 1] == s[i]:
        pass
    else:
        cnt += 1 s[i + 1] == s[i] s[i + 1] s i + 1 i 1 s[i] s i cnt += 1 cnt 1 print(cnt + 1) print cnt + 1 cnt 1 s = input() input() s cnt = 0 0 cnt n = int(input()) int(input()) n cnt += 1 1 cnt
n = int(input())
s = input()
cnt = 0
for i in range(len(s) - 1):
    if s[i + 1] == s[i]:
        pass
    else:
        cnt += 1
print(cnt + 1)