# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
#
#
# @stop_watch
def solve(N, S):
    fusioned = S[0]
    for s in S:
        if fusioned[-1] != s:
            fusioned += s
    print(len(fusioned))


if __name__ == '__main__':
    N = int(input())
    S = input()
    solve(N, S) def solve(N, S):
    fusioned = S[0]
    for s in S:
        if fusioned[-1] != s:
            fusioned += s
    print(len(fusioned)) solve fusioned = S[0] fusioned S[0] S 0 for s in S:
        if fusioned[-1] != s:
            fusioned += s
     s S if fusioned[-1] != s:
            fusioned += s
     fusioned[-1] != s fusioned[-1] fusioned -1 s fusioned += s fusioned s print(len(fusioned)) print len(fusioned) len fusioned N N S S if __name__ == '__main__':
    N = int(input())
    S = input()
    solve(N, S) __name__ == '__main__' __name__ '__main__' N = int(input()) N int(input()) int input() input S = input() S input() input solve(N, S) solve N S S = input() input() S def solve(N, S):
    fusioned = S[0]
    for s in S:
        if fusioned[-1] != s:
            fusioned += s
    print(len(fusioned)) def solve(N, S):
    fusioned = S[0]
    for s in S:
        if fusioned[-1] != s:
            fusioned += s
    print(len(fusioned)) solve N = int(input()) int(input()) N
# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
#
#
# @stop_watch
def solve(N, S):
    fusioned = S[0]
    for s in S:
        if fusioned[-1] != s:
            fusioned += s
    print(len(fusioned))


if __name__ == '__main__':
    N = int(input())
    S = input()
    solve(N, S)
