#!/usr/bin/env python3
n,s = open(0).read().split()
print(1+sum(s[i-1]!=s[i] for i in range(1,int(n)))) n,s = open(0).read().split() n open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split s print(1+sum(s[i-1]!=s[i] for i in range(1,int(n)))) print 1+sum(s[i-1]!=s[i] for i in range(1,int(n))) 1 sum(s[i-1]!=s[i] for i in range(1,int(n))) sum s[i-1]!=s[i] s[i-1] s i-1 i 1 s[i] s i s = open(0).read().split() open(0).read().split() s n,s = open(0).read().split() open(0).read().split() n
#!/usr/bin/env python3
n,s = open(0).read().split()
print(1+sum(s[i-1]!=s[i] for i in range(1,int(n))))
