import sys
# from math import sqrt, gcd, ceil, log
# from bisect import bisect
from collections import defaultdict, Counter
inp = sys.stdin.readline
read = lambda: list(map(int, inp().strip().split()))

# sys.setrecursionlimit(10**6)



def solve():
	n = int(input()); s = inp()
	ans = 1
	for i in range(1, n):
		if s[i-1] != s[i]:
			ans += 1
	print(ans)


		

if __name__ == "__main__":
	solve() import sys sys from collections import defaultdict, Counter inp = sys.stdin.readline inp sys.stdin.readline sys.stdin sys stdin readline read = lambda: list(map(int, inp().strip().split())) read lambda: list(map(int, inp().strip().split())) list(map(int, inp().strip().split())) list map(int, inp().strip().split()) map int inp().strip().split() ().strip().split ().strip() ().strip () inp strip split def solve():
	n = int(input()); s = inp()
	ans = 1
	for i in range(1, n):
		if s[i-1] != s[i]:
			ans += 1
	print(ans)


		 solve n = int(input()) n int(input()) int input() input s = inp() s inp() inp ans = 1 ans 1 for i in range(1, n):
		if s[i-1] != s[i]:
			ans += 1
	 i range(1, n) range 1 n if s[i-1] != s[i]:
			ans += 1
	 s[i-1] != s[i] s[i-1] s i-1 i 1 s[i] s i ans += 1 ans 1 print(ans) print ans if __name__ == "__main__":
	solve() __name__ == "__main__" __name__ "__main__" solve() solve read = lambda: list(map(int, inp().strip().split())) lambda: list(map(int, inp().strip().split())) read inp = sys.stdin.readline sys.stdin.readline inp def solve():
	n = int(input()); s = inp()
	ans = 1
	for i in range(1, n):
		if s[i-1] != s[i]:
			ans += 1
	print(ans)


		 def solve():
	n = int(input()); s = inp()
	ans = 1
	for i in range(1, n):
		if s[i-1] != s[i]:
			ans += 1
	print(ans)


		 solve
import sys
# from math import sqrt, gcd, ceil, log
# from bisect import bisect
from collections import defaultdict, Counter
inp = sys.stdin.readline
read = lambda: list(map(int, inp().strip().split()))

# sys.setrecursionlimit(10**6)



def solve():
	n = int(input()); s = inp()
	ans = 1
	for i in range(1, n):
		if s[i-1] != s[i]:
			ans += 1
	print(ans)


		

if __name__ == "__main__":
	solve()