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

    temp = S[0]
    result = 1
    for i in range(1,N):
        if temp != S[i]:
            result += 1
            temp = S[i]

    print(result)

if __name__ == '__main__':
    main() def main():
    N = int(input())
    S = input()

    temp = S[0]
    result = 1
    for i in range(1,N):
        if temp != S[i]:
            result += 1
            temp = S[i]

    print(result) main N = int(input()) N int(input()) int input() input S = input() S input() input temp = S[0] temp S[0] S 0 result = 1 result 1 for i in range(1,N):
        if temp != S[i]:
            result += 1
            temp = S[i]

     i range(1,N) range 1 N if temp != S[i]:
            result += 1
            temp = S[i]

     temp != S[i] temp S[i] S i result += 1 result 1 temp = S[i] temp S[i] S i print(result) print result if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N = int(input())
    S = input()

    temp = S[0]
    result = 1
    for i in range(1,N):
        if temp != S[i]:
            result += 1
            temp = S[i]

    print(result) def main():
    N = int(input())
    S = input()

    temp = S[0]
    result = 1
    for i in range(1,N):
        if temp != S[i]:
            result += 1
            temp = S[i]

    print(result) main
def main():
    N = int(input())
    S = input()

    temp = S[0]
    result = 1
    for i in range(1,N):
        if temp != S[i]:
            result += 1
            temp = S[i]

    print(result)

if __name__ == '__main__':
    main()