N=int(input()) S=list(map(str, input())) stack=[S[0]] for i in S[1:]: if stack[-1] != i: stack.append(i) print(len(stack))