import sys input = sys.stdin.readline N=int(input()) S=input().strip() T=[] for s in S: if T and s==T[-1]: continue else: T.append(s) print(len(T))