n = int(input())
s = input()
cur = s[0]
ans = 0
# if cur*n==s:
#     print(1)
# else:
for i in range(1,n):
    if s[i]==cur:
        pass
    else:
        cur = s[i]
        ans+=1
ans+=1
print(ans) n = int(input()) n int(input()) int input() input s = input() s input() input cur = s[0] cur s[0] s 0 ans = 0 ans 0 for i in range(1,n):
    if s[i]==cur:
        pass
    else:
        cur = s[i]
        ans+=1 i range(1,n) range 1 n if s[i]==cur:
        pass
    else:
        cur = s[i]
        ans+=1 s[i]==cur s[i] s i cur cur = s[i] cur s[i] s i ans+=1 ans 1 ans+=1 ans 1 print(ans) print ans n = int(input()) int(input()) n ans = 0 0 ans ans+=1 1 ans cur = s[i] s[i] cur cur = s[0] s[0] cur ans+=1 1 ans s = input() input() s
n = int(input())
s = input()
cur = s[0]
ans = 0
# if cur*n==s:
#     print(1)
# else:
for i in range(1,n):
    if s[i]==cur:
        pass
    else:
        cur = s[i]
        ans+=1
ans+=1
print(ans)