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