import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
S = _S()
#Ap = np.array(A)
#C = np.zeros(N + 1)

last = ''
count = 0
for i in range(N):
    a = S[i]
    if not last == a:
        count += 1
        last = a
print(count) import bisect,collections,copy,heapq,itertools,math,string bisect collections copy heapq itertools math string import numpy as np numpy import sys sys sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 def _S(): return sys.stdin.readline().rstrip() _S def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) LS N = I() N I() I S = _S() S _S() _S last = '' last '' count = 0 count 0 for i in range(N):
    a = S[i]
    if not last == a:
        count += 1
        last = a i range(N) range N a = S[i] a S[i] S i if not last == a:
        count += 1
        last = a not last == a last == a last a count += 1 count 1 last = a last a print(count) print count N = I() I() N a = S[i] S[i] a def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS def _S(): return sys.stdin.readline().rstrip() def _S(): return sys.stdin.readline().rstrip() _S def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI count = 0 0 count last = '' '' last last = a a last S = _S() _S() S count += 1 1 count
import bisect,collections,copy,heapq,itertools,math,string
import numpy as np
import sys
sys.setrecursionlimit(10**7)

def _S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

N = I()
S = _S()
#Ap = np.array(A)
#C = np.zeros(N + 1)

last = ''
count = 0
for i in range(N):
    a = S[i]
    if not last == a:
        count += 1
        last = a
print(count)