import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
a=ii()
l=list(i())
ans=1
for i in range(a-1):
  if l[i]!=l[i+1]:
    ans+=1
print(ans) import math math import sys sys from collections import deque import heapq heapq import copy copy import itertools itertools from itertools import permutations def mi() : return map(int,sys.stdin.readline().split()) mi def ii() : return int(sys.stdin.readline().rstrip()) ii def i() : return sys.stdin.readline().rstrip() i a=ii() a ii() ii l=list(i()) l list(i()) list i() i ans=1 ans 1 for i in range(a-1):
  if l[i]!=l[i+1]:
    ans+=1 i range(a-1) range a-1 a 1 if l[i]!=l[i+1]:
    ans+=1 l[i]!=l[i+1] l[i] l i l[i+1] l i+1 i 1 ans+=1 ans 1 print(ans) print ans l=list(i()) list(i()) l ans=1 1 ans ans+=1 1 ans def mi() : return map(int,sys.stdin.readline().split()) def mi() : return map(int,sys.stdin.readline().split()) mi a=ii() ii() a def ii() : return int(sys.stdin.readline().rstrip()) def ii() : return int(sys.stdin.readline().rstrip()) ii def i() : return sys.stdin.readline().rstrip() def i() : return sys.stdin.readline().rstrip() i
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
a=ii()
l=list(i())
ans=1
for i in range(a-1):
  if l[i]!=l[i+1]:
    ans+=1
print(ans)