import sys # sys.setrecursionlimit(200010) input=lambda:sys.stdin.readline().strip() write=lambda x:sys.stdout.write(str(x)+' ') # from bisect import bisect_left,bisect,insort from collections import deque,Counter,namedtuple,defaultdict # from copy import deepcopy # from decimal import Decimal # from datetime import datetime,timedelta from functools import cmp_to_key,reduce,lru_cache # from heapq import heapify,heappush,heappop # from itertools import permutations,combinations,accumulate from math import inf,sqrt,gcd,factorial,ceil,floor,e,log,log2,log10,pi,sin,cos,tan,asin,acos,atan,atan2 # from numba import jit from operator import or_,xor,add,mul # from random import randint,shuffle,getrandbits # from sortedcontainers import SortedSet def solve(): n=int(input()) s=input() ans=1;last=s[0] for i in range(1,n): if s[i]!=last: ans+=1 last=s[i] print(ans) return test=1 # test=int(input()) for _ in range(test): solve()