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


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


if __name__ == "__main__":
    main()

