# C - Slimes
def main():
    n = int(input())
    s = input()
    p = ''
    ans = ''

    for v in s:
        if v != p:
            ans += v
            p = v
        else:
            continue
    print(len(ans))

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

    for v in s:
        if v != p:
            ans += v
            p = v
        else:
            continue
    print(len(ans)) main n = int(input()) n int(input()) int input() input s = input() s input() input p = '' p '' ans = '' ans '' for v in s:
        if v != p:
            ans += v
            p = v
        else:
            continue
     v s if v != p:
            ans += v
            p = v
        else:
            continue
     v != p v p ans += v ans v p = v p v continue print(len(ans)) print len(ans) len ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = int(input())
    s = input()
    p = ''
    ans = ''

    for v in s:
        if v != p:
            ans += v
            p = v
        else:
            continue
    print(len(ans)) def main():
    n = int(input())
    s = input()
    p = ''
    ans = ''

    for v in s:
        if v != p:
            ans += v
            p = v
        else:
            continue
    print(len(ans)) main
# C - Slimes
def main():
    n = int(input())
    s = input()
    p = ''
    ans = ''

    for v in s:
        if v != p:
            ans += v
            p = v
        else:
            continue
    print(len(ans))

if __name__ == "__main__":
    main()