input()
s=input()
t,a=s[0],1
for c in s:
  if c!=t: a+=1; t=c
print(a) input() input s=input() s input() input t,a=s[0],1 t s[0] s 0 a 1 for c in s:
  if c!=t: a+=1; t=c c s if c!=t: a+=1; t c!=t c t print(a) print a t,a=s[0],1 s[0] t a=s[0],1 1 a s=input() input() s
input()
s=input()
t,a=s[0],1
for c in s:
  if c!=t: a+=1; t=c
print(a)