def main():
    N = input_int()
    S = input()

    validitylist = [False] * N
    validitylist[0] = True

    for i in range(1, N):
        if S[i-1] != S[i]:
            validitylist[i] = True
    
    print(len([i for i in validitylist if i is True]))



def input_int():
    return int(input())


def input_int_tuple():
    return map(int, input().split())


def input_int_list():
    return list(map(int, input().split()))


main() def main():
    N = input_int()
    S = input()

    validitylist = [False] * N
    validitylist[0] = True

    for i in range(1, N):
        if S[i-1] != S[i]:
            validitylist[i] = True
    
    print(len([i for i in validitylist if i is True])) main N = input_int() N input_int() input_int S = input() S input() input validitylist = [False] * N validitylist [False] * N [False] False N validitylist[0] = True validitylist[0] validitylist 0 True for i in range(1, N):
        if S[i-1] != S[i]:
            validitylist[i] = True
    
     i range(1, N) range 1 N if S[i-1] != S[i]:
            validitylist[i] = True
    
     S[i-1] != S[i] S[i-1] S i-1 i 1 S[i] S i validitylist[i] = True validitylist[i] validitylist i True i for i in validitylist if i is True for i in validitylist if i is True i validitylist i is True i True if i is True i print(len([i for i in validitylist if i is True])) print len([i for i in validitylist if i is True]) len [i for i in validitylist if i is True] def input_int():
    return int(input()) input_int return int(input()) int(input()) int input() input def input_int_tuple():
    return map(int, input().split()) input_int_tuple return map(int, input().split()) map(int, input().split()) map int input().split() ().split () input split def input_int_list():
    return list(map(int, input().split())) input_int_list return list(map(int, input().split())) list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split main() main def main():
    N = input_int()
    S = input()

    validitylist = [False] * N
    validitylist[0] = True

    for i in range(1, N):
        if S[i-1] != S[i]:
            validitylist[i] = True
    
    print(len([i for i in validitylist if i is True])) def main():
    N = input_int()
    S = input()

    validitylist = [False] * N
    validitylist[0] = True

    for i in range(1, N):
        if S[i-1] != S[i]:
            validitylist[i] = True
    
    print(len([i for i in validitylist if i is True])) main def input_int_tuple():
    return map(int, input().split()) def input_int_tuple():
    return map(int, input().split()) input_int_tuple def input_int():
    return int(input()) def input_int():
    return int(input()) input_int def input_int_list():
    return list(map(int, input().split())) def input_int_list():
    return list(map(int, input().split())) input_int_list
def main():
    N = input_int()
    S = input()

    validitylist = [False] * N
    validitylist[0] = True

    for i in range(1, N):
        if S[i-1] != S[i]:
            validitylist[i] = True
    
    print(len([i for i in validitylist if i is True]))



def input_int():
    return int(input())


def input_int_tuple():
    return map(int, input().split())


def input_int_list():
    return list(map(int, input().split()))


main()
