import math
from collections import defaultdict,deque
#from itertools import permutations
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""

n=ii()
s=ip()
ans=1
for i in range(1,n):
    if(s[i]!=s[i-1]):
        ans+=1
print(ans)         import math math from collections import defaultdict,deque ml=lambda:map(int,input().split()) ml lambda:map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split ll=lambda:list(map(int,input().split())) ll lambda:list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split ii=lambda:int(input()) ii lambda:int(input()) int(input()) int input() input ip=lambda:list(input()) ip lambda:list(input()) list(input()) list input() input ips=lambda:input().split() ips lambda:input().split() input().split() ().split () input split """========main code===============""" n=ii() n ii() ii s=ip() s ip() ip ans=1 ans 1 for i in range(1,n):
    if(s[i]!=s[i-1]):
        ans+=1 i range(1,n) range 1 n if(s[i]!=s[i-1]):
        ans+=1 s[i]!=s[i-1] s[i] s i s[i-1] s i-1 i 1 ans+=1 ans 1 print(ans) print ans ip=lambda:list(input()) lambda:list(input()) ip s=ip() ip() s ll=lambda:list(map(int,input().split())) lambda:list(map(int,input().split())) ll n=ii() ii() n ips=lambda:input().split() lambda:input().split() ips ans=1 1 ans ml=lambda:map(int,input().split()) lambda:map(int,input().split()) ml ans+=1 1 ans ii=lambda:int(input()) lambda:int(input()) ii
import math
from collections import defaultdict,deque
#from itertools import permutations
ml=lambda:map(int,input().split())
ll=lambda:list(map(int,input().split()))
ii=lambda:int(input())
ip=lambda:list(input())
ips=lambda:input().split()

"""========main code==============="""

n=ii()
s=ip()
ans=1
for i in range(1,n):
    if(s[i]!=s[i-1]):
        ans+=1
print(ans)        