def main():
    N = input_int()
    S = input()

    count = 1

    for i in range(1, N):
        if S[i-1] != S[i]:
            count += 1

    print(count)


def input_int():
    return int(input())


# def input_int_tuple():
#     return map(int, input().split())


# def input_int_list():
#     return list(map(int, input().split()))


main() def main():
    N = input_int()
    S = input()

    count = 1

    for i in range(1, N):
        if S[i-1] != S[i]:
            count += 1

    print(count) main N = input_int() N input_int() input_int S = input() S input() input count = 1 count 1 for i in range(1, N):
        if S[i-1] != S[i]:
            count += 1

     i range(1, N) range 1 N if S[i-1] != S[i]:
            count += 1

     S[i-1] != S[i] S[i-1] S i-1 i 1 S[i] S i count += 1 count 1 print(count) print count def input_int():
    return int(input())


# def input_int_tuple():
#     return map(int, input().split())


# def input_int_list():
#     return list(map(int, input().split())) input_int return int(input()) int(input()) int input() input main() main def input_int():
    return int(input())


# def input_int_tuple():
#     return map(int, input().split())


# def input_int_list():
#     return list(map(int, input().split())) def input_int():
    return int(input())


# def input_int_tuple():
#     return map(int, input().split())


# def input_int_list():
#     return list(map(int, input().split())) input_int def main():
    N = input_int()
    S = input()

    count = 1

    for i in range(1, N):
        if S[i-1] != S[i]:
            count += 1

    print(count) def main():
    N = input_int()
    S = input()

    count = 1

    for i in range(1, N):
        if S[i-1] != S[i]:
            count += 1

    print(count) main
def main():
    N = input_int()
    S = input()

    count = 1

    for i in range(1, N):
        if S[i-1] != S[i]:
            count += 1

    print(count)


def input_int():
    return int(input())


# def input_int_tuple():
#     return map(int, input().split())


# def input_int_list():
#     return list(map(int, input().split()))


main()
