
def solve():
    ans = N
    for i in range(N-1):
        if S[i] == S[i+1]:
            ans -= 1
    print(ans)

if __name__ == "__main__":
    N = int(input())
    S = input()
    solve() def solve():
    ans = N
    for i in range(N-1):
        if S[i] == S[i+1]:
            ans -= 1
    print(ans) solve ans = N ans N 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__":
    N = int(input())
    S = input()
    solve() __name__ == "__main__" __name__ "__main__" N = int(input()) N int(input()) int input() input S = input() S input() input solve() solve S = input() input() S def solve():
    ans = N
    for i in range(N-1):
        if S[i] == S[i+1]:
            ans -= 1
    print(ans) def solve():
    ans = N
    for i in range(N-1):
        if S[i] == S[i+1]:
            ans -= 1
    print(ans) solve N = int(input()) int(input()) N

def solve():
    ans = N
    for i in range(N-1):
        if S[i] == S[i+1]:
            ans -= 1
    print(ans)

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