from itertools import groupby





def solve(string):

    n, s = string.split()

    return str(len(list(groupby(s))))





if __name__ == '__main__':

    print((solve('\n'.join([eval(input()), eval(input())]))))

def solve(string):

    n, s = string.split()

    return str(int(n) - sum([1 for d1, d2 in zip(s, s[1:]) if d1 == d2]))





if __name__ == '__main__':

    print((solve('\n'.join([eval(input()), eval(input())]))))

from itertools import groupby


def solve(string):
    n, s = string.split()
    return str(len(list(groupby(s))))


if __name__ == "__main__":
    print((solve("\n".join([eval(input()), eval(input())]))))

def solve(string):
    n, s = string.split()
    return str(int(n) - sum([1 for d1, d2 in zip(s, s[1:]) if d1 == d2]))


if __name__ == "__main__":
    print((solve("\n".join([eval(input()), eval(input())]))))

-from itertools import groupby - - -    return str(len(list(groupby(s)))) +    return str(int(n) - sum([1 for d1, d2 in zip(s, s[1:]) if d1 == d2]))