N = int(input()) S = input() cnt = 0 now = 'a' for c in S: if c != now: cnt += 1 now = c print(cnt)