n=int(input())
s=input()
k=0
l=set(s)
k=s[0]
ans=1
if len(l)==1:
    print("1")
    exit()
for i in range(1,n):
    if k!=s[i]:
        ans+=1
        k=s[i]
print(ans) n=int(input()) n int(input()) int input() input s=input() s input() input k=0 k 0 l=set(s) l set(s) set s k=s[0] k s[0] s 0 ans=1 ans 1 if len(l)==1:
    print("1")
    exit() len(l)==1 len(l) len l 1 print("1") print "1" exit() exit for i in range(1,n):
    if k!=s[i]:
        ans+=1
        k=s[i] i range(1,n) range 1 n if k!=s[i]:
        ans+=1
        k=s[i] k!=s[i] k s[i] s i ans+=1 ans 1 k=s[i] k s[i] s i print(ans) print ans ans=1 1 ans s=input() input() s k=0 0 k l=set(s) set(s) l ans+=1 1 ans n=int(input()) int(input()) n k=s[0] s[0] k k=s[i] s[i] k
n=int(input())
s=input()
k=0
l=set(s)
k=s[0]
ans=1
if len(l)==1:
    print("1")
    exit()
for i in range(1,n):
    if k!=s[i]:
        ans+=1
        k=s[i]
print(ans)
