def main():
    n = int(input())
    s = input()
    ans = 0
    for i in range(n):
        if i == 0:
            ans += 1
            mae = s[i]
        else:
            if s[i] != mae:
                ans += 1
                mae = s[i]
    print(ans)


    
if __name__ == "__main__":
    main() def main():
    n = int(input())
    s = input()
    ans = 0
    for i in range(n):
        if i == 0:
            ans += 1
            mae = s[i]
        else:
            if s[i] != mae:
                ans += 1
                mae = s[i]
    print(ans)


     main n = int(input()) n int(input()) int input() input s = input() s input() input ans = 0 ans 0 for i in range(n):
        if i == 0:
            ans += 1
            mae = s[i]
        else:
            if s[i] != mae:
                ans += 1
                mae = s[i]
     i range(n) range n if i == 0:
            ans += 1
            mae = s[i]
        else:
            if s[i] != mae:
                ans += 1
                mae = s[i]
     i == 0 i 0 ans += 1 ans 1 mae = s[i] mae s[i] s i if s[i] != mae:
                ans += 1
                mae = s[i]
     s[i] != mae s[i] s i mae ans += 1 ans 1 mae = s[i] mae s[i] s i print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    n = int(input())
    s = input()
    ans = 0
    for i in range(n):
        if i == 0:
            ans += 1
            mae = s[i]
        else:
            if s[i] != mae:
                ans += 1
                mae = s[i]
    print(ans)


     def main():
    n = int(input())
    s = input()
    ans = 0
    for i in range(n):
        if i == 0:
            ans += 1
            mae = s[i]
        else:
            if s[i] != mae:
                ans += 1
                mae = s[i]
    print(ans)


     main
def main():
    n = int(input())
    s = input()
    ans = 0
    for i in range(n):
        if i == 0:
            ans += 1
            mae = s[i]
        else:
            if s[i] != mae:
                ans += 1
                mae = s[i]
    print(ans)


    
if __name__ == "__main__":
    main()
