import os, sys if os.path.exists("input.txt"): sys.stdin = open('input.txt', 'r') read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines def inp(): return readline().rstrip().decode('utf-8') def inps(): return map(int, inp().split()) import itertools inp() S = inp() print(len(list(itertools.groupby(S))))