ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq

n = ni()
s = input()
cnt = 0
prev=""
for i in range(n):
    if prev==s[i]:
        pass
    else:
        cnt+=1
    prev=s[i]
print(cnt) ma = lambda :map(int,input().split()) ma lambda :map(int,input().split()) map(int,input().split()) map int input().split() ().split () input split lma = lambda :list(map(int,input().split())) lma lambda :list(map(int,input().split())) list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split tma = lambda :tuple(map(int,input().split())) tma lambda :tuple(map(int,input().split())) tuple(map(int,input().split())) tuple map(int,input().split()) map int input().split() ().split () input split ni = lambda:int(input()) ni lambda:int(input()) int(input()) int input() input yn = lambda fl:print("Yes") if fl else print("No") yn lambda fl:print("Yes") if fl else print("No") print("Yes") if fl else print("No") fl print("Yes") print "Yes" print("No") print "No" fl import collections collections import math math import itertools itertools import heapq as hq heapq n = ni() n ni() ni s = input() s input() input cnt = 0 cnt 0 prev="" prev "" for i in range(n):
    if prev==s[i]:
        pass
    else:
        cnt+=1
    prev=s[i] i range(n) range n if prev==s[i]:
        pass
    else:
        cnt+=1
     prev==s[i] prev s[i] s i cnt+=1 cnt 1 prev=s[i] prev s[i] s i print(cnt) print cnt yn = lambda fl:print("Yes") if fl else print("No") lambda fl:print("Yes") if fl else print("No") yn ma = lambda :map(int,input().split()) lambda :map(int,input().split()) ma n = ni() ni() n lma = lambda :list(map(int,input().split())) lambda :list(map(int,input().split())) lma tma = lambda :tuple(map(int,input().split())) lambda :tuple(map(int,input().split())) tma ni = lambda:int(input()) lambda:int(input()) ni s = input() input() s prev="" "" prev cnt = 0 0 cnt prev=s[i] s[i] prev cnt+=1 1 cnt
ma = lambda :map(int,input().split())
lma = lambda :list(map(int,input().split()))
tma = lambda :tuple(map(int,input().split()))
ni = lambda:int(input())
yn = lambda fl:print("Yes") if fl else print("No")
import collections
import math
import itertools
import heapq as hq

n = ni()
s = input()
cnt = 0
prev=""
for i in range(n):
    if prev==s[i]:
        pass
    else:
        cnt+=1
    prev=s[i]
print(cnt)
