n=int(input())
s=input()
res=s[0]
ans=1
for i in range(1,n):
  if s[i]==res:
    continue
  else:
    res=s[i]
    ans+=1
print(ans) n=int(input()) n int(input()) int input() input s=input() s input() input res=s[0] res s[0] s 0 ans=1 ans 1 for i in range(1,n):
  if s[i]==res:
    continue
  else:
    res=s[i]
    ans+=1 i range(1,n) range 1 n if s[i]==res:
    continue
  else:
    res=s[i]
    ans+=1 s[i]==res s[i] s i res continue res=s[i] res s[i] s i ans+=1 ans 1 print(ans) print ans res=s[i] s[i] res ans=1 1 ans res=s[0] s[0] res ans+=1 1 ans s=input() input() s n=int(input()) int(input()) n
n=int(input())
s=input()
res=s[0]
ans=1
for i in range(1,n):
  if s[i]==res:
    continue
  else:
    res=s[i]
    ans+=1
print(ans)