
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    cnt=0
    N=I()
    S=input()
    now="A"
    for i in range(N):
        if S[i]!=now:
            cnt+=1
        now=S[i]
        
    print(cnt)

main() def I(): return int(input()) I def MI(): return map(int, input().split()) MI def LI(): return list(map(int, input().split())) LI def main():
    mod=10**9+7
    cnt=0
    N=I()
    S=input()
    now="A"
    for i in range(N):
        if S[i]!=now:
            cnt+=1
        now=S[i]
        
    print(cnt) main mod=10**9+7 mod 10**9+7 10**9 10 9 7 cnt=0 cnt 0 N=I() N I() I S=input() S input() input now="A" now "A" for i in range(N):
        if S[i]!=now:
            cnt+=1
        now=S[i]
        
     i range(N) range N if S[i]!=now:
            cnt+=1
         S[i]!=now S[i] S i now cnt+=1 cnt 1 now=S[i] now S[i] S i print(cnt) print cnt main() main def I(): return int(input()) def I(): return int(input()) I def main():
    mod=10**9+7
    cnt=0
    N=I()
    S=input()
    now="A"
    for i in range(N):
        if S[i]!=now:
            cnt+=1
        now=S[i]
        
    print(cnt) def main():
    mod=10**9+7
    cnt=0
    N=I()
    S=input()
    now="A"
    for i in range(N):
        if S[i]!=now:
            cnt+=1
        now=S[i]
        
    print(cnt) main def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI def MI(): return map(int, input().split()) def MI(): return map(int, input().split()) MI

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    cnt=0
    N=I()
    S=input()
    now="A"
    for i in range(N):
        if S[i]!=now:
            cnt+=1
        now=S[i]
        
    print(cnt)

main()
