input()
S=input()

l=S[0]
c=1
for i in S[1:]:
 if l!=i:
  c+=1
  l=i
print(c) input() input S=input() S input() input l=S[0] l S[0] S 0 c=1 c 1 for i in S[1:]:
 if l!=i:
  c+=1
  l=i i S[1:] S 1: 1 if l!=i:
  c+=1
  l=i l!=i l i c+=1 c 1 l=i l i print(c) print c c+=1 1 c l=S[0] S[0] l c=1 1 c S=input() input() S l=i i l
input()
S=input()

l=S[0]
c=1
for i in S[1:]:
 if l!=i:
  c+=1
  l=i
print(c)