# cook your dish here
import sys
def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w') 

def main(N, arr):

	#initialising with positive infinity value
	maxi=float("inf")

	#initialising the answer variable
	ans=0

	#iterating linesrly
	for i in range(N):

		#finding minimum at each step
	    maxi=min(maxi,arr[i])
	    #increasing the final ans
	    ans+=maxi
	    print("dhh")

    #returning the answer
	return ans
        
#file()	
if __name__ == '__main__':

	#length of the array
	'''N = 4

	#Maximum size of each individual bucket
	Arr = [4,3,2,1]

	#passing the values to the main function
	answer = main(N,Arr)

	#printing the result
	print(answer)'''
	n=int(input())
	s=input()

	#l=list(map(int, input().split()))
	ans=0
	for i in range(1,n):
		if(s[i]!=s[i-1]):
			ans+=1
	print(ans+1)		





 import sys sys def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w')  file sys.stdin = open('input.py', 'r') sys.stdin sys stdin open('input.py', 'r') open 'input.py' 'r' sys.stdout = open('output.py', 'w') sys.stdout sys stdout open('output.py', 'w') open 'output.py' 'w' def main(N, arr):

	#initialising with positive infinity value
	maxi=float("inf")

	#initialising the answer variable
	ans=0

	#iterating linesrly
	for i in range(N):

		#finding minimum at each step
	    maxi=min(maxi,arr[i])
	    #increasing the final ans
	    ans+=maxi
	    print("dhh")

    #returning the answer
	return ans
        
#file()	 main maxi=float("inf") maxi float("inf") float "inf" ans=0 ans 0 for i in range(N):

		#finding minimum at each step
	    maxi=min(maxi,arr[i])
	    #increasing the final ans
	    ans+=maxi
	    print("dhh")

    #returning the answer
	 i range(N) range N maxi=min(maxi,arr[i]) maxi min(maxi,arr[i]) min maxi arr[i] arr i ans+=maxi ans maxi print("dhh") print "dhh" return ans ans N N arr arr if __name__ == '__main__':

	#length of the array
	'''N = 4

	#Maximum size of each individual bucket
	Arr = [4,3,2,1]

	#passing the values to the main function
	answer = main(N,Arr)

	#printing the result
	print(answer)'''
	n=int(input())
	s=input()

	#l=list(map(int, input().split()))
	ans=0
	for i in range(1,n):
		if(s[i]!=s[i-1]):
			ans+=1
	print(ans+1)		 __name__ == '__main__' __name__ '__main__' '''N = 4

	#Maximum size of each individual bucket
	Arr = [4,3,2,1]

	#passing the values to the main function
	answer = main(N,Arr)

	#printing the result
	print(answer)''' n=int(input()) n int(input()) int input() input s=input() s input() input ans=0 ans 0 for i in range(1,n):
		if(s[i]!=s[i-1]):
			ans+=1
	 i range(1,n) range 1 n if(s[i]!=s[i-1]):
			ans+=1
	 s[i]!=s[i-1] s[i] s i s[i-1] s i-1 i 1 ans+=1 ans 1 print(ans+1) print ans+1 ans 1 n=int(input()) int(input()) n def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w')  def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w')  file ans=0 0 ans ans+=1 1 ans s=input() input() s def main(N, arr):

	#initialising with positive infinity value
	maxi=float("inf")

	#initialising the answer variable
	ans=0

	#iterating linesrly
	for i in range(N):

		#finding minimum at each step
	    maxi=min(maxi,arr[i])
	    #increasing the final ans
	    ans+=maxi
	    print("dhh")

    #returning the answer
	return ans
        
#file()	 def main(N, arr):

	#initialising with positive infinity value
	maxi=float("inf")

	#initialising the answer variable
	ans=0

	#iterating linesrly
	for i in range(N):

		#finding minimum at each step
	    maxi=min(maxi,arr[i])
	    #increasing the final ans
	    ans+=maxi
	    print("dhh")

    #returning the answer
	return ans
        
#file()	 main
# cook your dish here
import sys
def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w') 

def main(N, arr):

	#initialising with positive infinity value
	maxi=float("inf")

	#initialising the answer variable
	ans=0

	#iterating linesrly
	for i in range(N):

		#finding minimum at each step
	    maxi=min(maxi,arr[i])
	    #increasing the final ans
	    ans+=maxi
	    print("dhh")

    #returning the answer
	return ans
        
#file()	
if __name__ == '__main__':

	#length of the array
	'''N = 4

	#Maximum size of each individual bucket
	Arr = [4,3,2,1]

	#passing the values to the main function
	answer = main(N,Arr)

	#printing the result
	print(answer)'''
	n=int(input())
	s=input()

	#l=list(map(int, input().split()))
	ans=0
	for i in range(1,n):
		if(s[i]!=s[i-1]):
			ans+=1
	print(ans+1)		






