#https://atcoder.jp/contests/abc143/tasks/abc143_c
N =int(input())
S =str(input())
cnt = 1
moji = S[0]
for i in range(1,N):
    if S[i] != moji:
        cnt += 1
        moji = S[i]

print(cnt)    
    
    

 N =int(input()) N int(input()) int input() input S =str(input()) S str(input()) str input() input cnt = 1 cnt 1 moji = S[0] moji S[0] S 0 for i in range(1,N):
    if S[i] != moji:
        cnt += 1
        moji = S[i] i range(1,N) range 1 N if S[i] != moji:
        cnt += 1
        moji = S[i] S[i] != moji S[i] S i moji cnt += 1 cnt 1 moji = S[i] moji S[i] S i print(cnt) print cnt S =str(input()) str(input()) S moji = S[0] S[0] moji N =int(input()) int(input()) N cnt += 1 1 cnt moji = S[i] S[i] moji cnt = 1 1 cnt
#https://atcoder.jp/contests/abc143/tasks/abc143_c
N =int(input())
S =str(input())
cnt = 1
moji = S[0]
for i in range(1,N):
    if S[i] != moji:
        cnt += 1
        moji = S[i]

print(cnt)    
    
    


