import sys input = sys.stdin.readline N = int(input()) S = input().strip() ans = 0 bk = "" for s in S: if bk!=s: ans += 1 bk=s print(ans)