def actual(n, s):
    count = 0
    last_color = ''

    for color in s:
        if last_color != color:
            last_color = color
            count += 1

    return count

n = int(input())
s = input()

print(actual(n, s)) def actual(n, s):
    count = 0
    last_color = ''

    for color in s:
        if last_color != color:
            last_color = color
            count += 1

    return count actual count = 0 count 0 last_color = '' last_color '' for color in s:
        if last_color != color:
            last_color = color
            count += 1

     color s if last_color != color:
            last_color = color
            count += 1

     last_color != color last_color color last_color = color last_color color count += 1 count 1 return count count n n s s n = int(input()) n int(input()) int input() input s = input() s input() input print(actual(n, s)) print actual(n, s) actual n s def actual(n, s):
    count = 0
    last_color = ''

    for color in s:
        if last_color != color:
            last_color = color
            count += 1

    return count def actual(n, s):
    count = 0
    last_color = ''

    for color in s:
        if last_color != color:
            last_color = color
            count += 1

    return count actual s = input() input() s n = int(input()) int(input()) n
def actual(n, s):
    count = 0
    last_color = ''

    for color in s:
        if last_color != color:
            last_color = color
            count += 1

    return count

n = int(input())
s = input()

print(actual(n, s))
