n = input()
n = input()
cnt = 0
a = n[0]
for i in range(1,len(n)):
    if a == n[i]:
        continue
    else:
        cnt += 1
        a = n[i]
print(cnt + 1) n = input() n input() input n = input() n input() input cnt = 0 cnt 0 a = n[0] a n[0] n 0 for i in range(1,len(n)):
    if a == n[i]:
        continue
    else:
        cnt += 1
        a = n[i] i range(1,len(n)) range 1 len(n) len n if a == n[i]:
        continue
    else:
        cnt += 1
        a = n[i] a == n[i] a n[i] n i continue cnt += 1 cnt 1 a = n[i] a n[i] n i print(cnt + 1) print cnt + 1 cnt 1 a = n[i] n[i] a n = input() input() n n = input() input() n cnt = 0 0 cnt a = n[0] n[0] a cnt += 1 1 cnt
n = input()
n = input()
cnt = 0
a = n[0]
for i in range(1,len(n)):
    if a == n[i]:
        continue
    else:
        cnt += 1
        a = n[i]
print(cnt + 1)
