import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    S = readline().strip()

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

    print(ans)
    return


if __name__ == '__main__':
    main() import sys sys read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 1 << 60 INF 1 << 60 1 60 MOD = 1000000007 MOD 1000000007 def main():
    N = int(readline())
    S = readline().strip()

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

    print(ans)
    return main N = int(readline()) N int(readline()) int readline() readline S = readline().strip() S readline().strip() ().strip () readline strip ans = 1 ans 1 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 return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main read = sys.stdin.read sys.stdin.read read readlines = sys.stdin.readlines sys.stdin.readlines readlines MOD = 1000000007 1000000007 MOD def main():
    N = int(readline())
    S = readline().strip()

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

    print(ans)
    return def main():
    N = int(readline())
    S = readline().strip()

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

    print(ans)
    return main readline = sys.stdin.readline sys.stdin.readline readline INF = 1 << 60 1 << 60 INF
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


def main():
    N = int(readline())
    S = readline().strip()

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

    print(ans)
    return


if __name__ == '__main__':
    main()
