import os, sys, re, math

N = int(input())
S = input()

count = 1
for i in range(N - 1):
    if S[i] != S[i + 1]:
        count += 1

print(count) import os, sys, re, math os sys re math N = int(input()) N int(input()) int input() input S = input() S input() input count = 1 count 1 for i in range(N - 1):
    if S[i] != S[i + 1]:
        count += 1 i range(N - 1) range N - 1 N 1 if S[i] != S[i + 1]:
        count += 1 S[i] != S[i + 1] S[i] S i S[i + 1] S i + 1 i 1 count += 1 count 1 print(count) print count S = input() input() S N = int(input()) int(input()) N count += 1 1 count count = 1 1 count
import os, sys, re, math

N = int(input())
S = input()

count = 1
for i in range(N - 1):
    if S[i] != S[i + 1]:
        count += 1

print(count)
