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