from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys
#####################################
n=int(input())
A=list(input())
X=["0"]
for i in range(n):
    if X[-1]!=A[i]:
        X.append(A[i])
X.pop(0)
print(len(X)) from sys import stdin,stdout def INPUT():return list(int(i) for i in stdin.readline().split()) INPUT import math math def inp():return stdin.readline() inp def out(x):return stdout.write(x) out x x import math as M math MOD=10**9+7 MOD 10**9+7 10**9 10 9 7 import sys sys n=int(input()) n int(input()) int input() input A=list(input()) A list(input()) list input() input X=["0"] X ["0"] "0" for i in range(n):
    if X[-1]!=A[i]:
        X.append(A[i]) i range(n) range n if X[-1]!=A[i]:
        X.append(A[i]) X[-1]!=A[i] X[-1] X -1 A[i] A i X.append(A[i]) X.append X append A[i] A i X.pop(0) X.pop X pop 0 print(len(X)) print len(X) len X n=int(input()) int(input()) n def out(x):return stdout.write(x) def out(x):return stdout.write(x) out def INPUT():return list(int(i) for i in stdin.readline().split()) def INPUT():return list(int(i) for i in stdin.readline().split()) INPUT MOD=10**9+7 10**9+7 MOD def inp():return stdin.readline() def inp():return stdin.readline() inp A=list(input()) list(input()) A X=["0"] ["0"] X
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys
#####################################
n=int(input())
A=list(input())
X=["0"]
for i in range(n):
    if X[-1]!=A[i]:
        X.append(A[i])
X.pop(0)
print(len(X))
