N = int(input())
#print(N)

S = input()

count = 0
for i in range(N):
    #print(S[i] , i)
    if i == N-1:
        break
    else:
        if S[i+1] != S[i]:
            count += 1

if count == 0:
    print(1)
else:
    print(count+1) N = int(input()) N int(input()) int input() input S = input() S input() input count = 0 count 0 for i in range(N):
    #print(S[i] , i)
    if i == N-1:
        break
    else:
        if S[i+1] != S[i]:
            count += 1 i range(N) range N if i == N-1:
        break
    else:
        if S[i+1] != S[i]:
            count += 1 i == N-1 i N-1 N 1 break if S[i+1] != S[i]:
            count += 1 S[i+1] != S[i] S[i+1] S i+1 i 1 S[i] S i count += 1 count 1 if count == 0:
    print(1)
else:
    print(count+1) count == 0 count 0 print(1) print 1 print(count+1) print count+1 count 1 count += 1 1 count N = int(input()) int(input()) N count = 0 0 count S = input() input() S
N = int(input())
#print(N)

S = input()

count = 0
for i in range(N):
    #print(S[i] , i)
    if i == N-1:
        break
    else:
        if S[i+1] != S[i]:
            count += 1

if count == 0:
    print(1)
else:
    print(count+1)