# -*- coding: utf-8 -*-

n = int(eval(input()))

s = list(str(eval(input())))



def remove_adjacent(nums):

  i = 1

  while i < len(nums):    

    if nums[i] == nums[i-1]:

      nums.pop(i)

      i -= 1  

    i += 1

  return nums



remove_adjacent(s)

print((len(s)))

# -*- coding: utf-8 -*-

n = int(eval(input()))

s = list(str(eval(input())))



ans = 1

for i in range(n - 1):

    if s[i] != s[i + 1]:

        ans += 1

print(ans)



"""

def remove_adjacent(nums):

  i = 1

  while i < len(nums):    

    if nums[i] == nums[i-1]:

      nums.pop(i)

      i -= 1  

    i += 1

  return nums



remove_adjacent(s)

print(len(s))

"""
# -*- coding: utf-8 -*-
n = int(eval(input()))
s = list(str(eval(input())))


def remove_adjacent(nums):
    i = 1
    while i < len(nums):
        if nums[i] == nums[i - 1]:
            nums.pop(i)
            i -= 1
        i += 1
    return nums


remove_adjacent(s)
print((len(s)))

# -*- coding: utf-8 -*-
n = int(eval(input()))
s = list(str(eval(input())))
ans = 1
for i in range(n - 1):
    if s[i] != s[i + 1]:
        ans += 1
print(ans)
"""
def remove_adjacent(nums):
  i = 1
  while i < len(nums):    
    if nums[i] == nums[i-1]:
      nums.pop(i)
      i -= 1  
    i += 1
  return nums
remove_adjacent(s)
print(len(s))
"""

- - +ans = 1 +for i in range(n - 1): +    if s[i] != s[i + 1]: +        ans += 1 +print(ans) +""" -    i = 1 -    while i < len(nums): -        if nums[i] == nums[i - 1]: -            nums.pop(i) -            i -= 1 -        i += 1 -    return nums - - +  i = 1 +  while i < len(nums): +    if nums[i] == nums[i-1]: +      nums.pop(i) +      i -= 1 +    i += 1 +  return nums -print((len(s))) +print(len(s)) +"""