def main():
    n = int(input())
    s = input()

    cnt = 1

    for i in range(1, n):
        if s[i - 1] != s[i]:
            cnt += 1

    print(cnt)


if __name__ == "__main__":
    main() def main():
    n = int(input())
    s = input()

    cnt = 1

    for i in range(1, n):
        if s[i - 1] != s[i]:
            cnt += 1

    print(cnt) main n = int(input()) n int(input()) int input() input s = input() s input() input cnt = 1 cnt 1 for i in range(1, n):
        if s[i - 1] != s[i]:
            cnt += 1

     i range(1, n) range 1 n if s[i - 1] != s[i]:
            cnt += 1

     s[i - 1] != s[i] s[i - 1] s i - 1 i 1 s[i] s i cnt += 1 cnt 1 print(cnt) print cnt if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = int(input())
    s = input()

    cnt = 1

    for i in range(1, n):
        if s[i - 1] != s[i]:
            cnt += 1

    print(cnt) def main():
    n = int(input())
    s = input()

    cnt = 1

    for i in range(1, n):
        if s[i - 1] != s[i]:
            cnt += 1

    print(cnt) main
def main():
    n = int(input())
    s = input()

    cnt = 1

    for i in range(1, n):
        if s[i - 1] != s[i]:
            cnt += 1

    print(cnt)


if __name__ == "__main__":
    main()
