N = int(input())
S = input()
assert len(S) == N

# 隣接するスライムは同色なら融合し1体に
count = 0
color = ''
for c in S:
  if c != color:
    color = c
    count += 1
print(count) N = int(input()) N int(input()) int input() input S = input() S input() input assert len(S) == N len(S) == N len(S) len S N count = 0 count 0 color = '' color '' for c in S:
  if c != color:
    color = c
    count += 1 c S if c != color:
    color = c
    count += 1 c != color c color color = c color c count += 1 count 1 print(count) print count N = int(input()) int(input()) N count += 1 1 count color = c c color S = input() input() S color = '' '' color count = 0 0 count
N = int(input())
S = input()
assert len(S) == N

# 隣接するスライムは同色なら融合し1体に
count = 0
color = ''
for c in S:
  if c != color:
    color = c
    count += 1
print(count)