Problem:
 Score : 300 points    Problem Statement There are N slimes lining up from left to right. The colors of these slimes will be given as a string S of length N consisting of lowercase English letters. The i -th slime from the left has the color that corresponds to the i -th character of S .  Adjacent slimes with the same color will fuse into one larger slime without changing the color. If there were a slime adjacent to this group of slimes before fusion, that slime is now adjacent to the new larger slime.  Ultimately, how many slimes will be there?      Constraints  1 \leq N \leq 10^5  |S| = N  S consists of lowercase English letters.         Input Input is given from Standard Input in the following format:  N  S       Output Print the final number of slimes.        Sample Input 1 10
aabbbbaaca      Sample Output 1 5  Ultimately, these slimes will fuse into abaca .       Sample Input 2 5
aaaaa      Sample Output 2 1  All the slimes will fuse into one.       Sample Input 3 20
xxzaffeeeeddfkkkkllq      Sample Output 3 10

Solution (Python):
n = int(input())
s = input()
c = n

for i in range(1,n):
    if s[i-1] == s[i]:
        
        c -= 1

print(c)

Solution (Python):
n = int(input())
s = str(input())
cnt = 0
hikaku = ""

for i in s:
    if i == hikaku:
        pass
    else:
        cnt += 1
        hikaku = i
print(cnt)

Solution (Python):
n=int(input())
s=list(input())
count=1
for i in range(n-1):
  if s[i]!=s[i+1]:
    count+=1
print(count)

Solution (Python):
length = input()
string = input()

color = 1
prev = string[0]
modified = string[0]


for c in string :
    if c == prev :
        continue
    else :
        prev = c
        color = color + 1
        modified = modified + c

print(color)

Solution (Python):
N = int(input())
S = list(input())
 
length = 1
i = 0
while i < N-1:
  if S[i] == S[i+1]:
    i += 1
  else:
    length += 1
    i += 1
    
print(length)

Solution (Python):
n = int(input())
s = input()
a = []
ss = list(s)
old = ""
ans = ""
for i in ss:
	if old != i:
		ans += i
		old = i
print (len(ans))

Solution (Python):
N=int(input())
S=list(input())
cnt=1
tmp=S[0]

for n,i in enumerate(S):
  if(n!=0):
    if(tmp!=i):
      cnt+=1
      tmp=i
print(cnt)

Solution (Python):
from functools import reduce

N = int(input())
S = input()

B = ""
R = ""
for s in S:
    if B != s:
        R += s
        B = s

print(len(R))

Solution (Python):
N = int(input())
S = list(input())
L = len(S)

back = S[0]
for i in range(1, L):
	if back == S[i]:
		S[i] = ""
	else:
		back = S[i]

S = "".join(S)
print(len(S))

Solution (Python):

N = int(input())
S = input()

count = 1
pre = S[0]
for i in range(1, N):
    if S[i] != pre:
        pre = S[i]
        count += 1
        
print(count)

Solution (Python):
n = int(input())
s = input()

p = ''
count = 0
for i in range(n):
  if p != s[i]:
    count += 1
    p = s[i]
print(count)

Solution (Python):
n=int(input())
s=input()
cnt=0
prev=s[0]
for i in range(n-1):
    if prev == s[i+1]:
        continue
    cnt+=1
    prev = s[i+1]
cnt+=1
print(cnt)

Solution (Python):
n = int(input())
s = list(input())



ans = 1
pre = s[0]
for i in range(1, n):
    if s[i]!=pre:
        ans+=1
    pre = s[i]

print(ans)

Solution (Python):
N = int(input())
S = list(input())

sumx = 0
mem = ""

for i in S:
    if i != mem:
        sumx += 1
        mem = i
    else:
        mem = i

print(sumx)

Solution (Python):
n = int(input())
s = input()
opt = ''
count = 0
for c in s:
    if c != opt:
        count+=1
        opt = c
print(count)

Solution (Python):
N = input()
S = input()
_ = ""
ans = 0
for s in S:
    if s != _:
        ans += 1
    _ = s
print(ans)

Solution (Python):
import math

n = int(input())
s = input()

ans = 1
c = s[0]
for i in range(n-1):
    if s[i+1] != c:
        ans += 1
    c = s[i+1]

print(ans)

Solution (Python):
N = int(input())
S = input()
X = []
tmp = 0
for s in S:
    if s != tmp:
        tmp = s
        X.append(s)
ans = len(X)
print(ans)

Solution (Python):
N = int(input())
S = input()

count = 0
prev_s = ""

for s in S:
    if prev_s != s:
        count += 1
        prev_s = s

print(count)

Solution (Python):
n=int(input())
s=list(input())
cnt=1
tmp=s[0]
for i in range(0,n):
    if s[i] != tmp:
        cnt+=1
        tmp=s[i]
    else:
        continue
print(cnt)

Solution (Python):
n=int(input())

s=input()

memo = ''

count = 0

for i in range(n):
    if i == 0:
        memo = s[0]
        count += 1
    elif memo == s[i]:
        continue
    else:
        memo = s[i]
        count += 1
print(count)

Solution (Python):
n = int(input())
s = input()
pre = None
ans = 0
for i in s:
    if i != pre:
        ans += 1
        pre = i
print(ans)

Solution (Python):
n=int(input())
s=list(input())
s2=[]
t=""
for s1 in s:
 if t!=s1:
     s2.append(t)
 t=s1


print(len(s2))

Solution (Python):
n = int(input())
s = list(input())
res = s[0]
count = 1
for i in range(1, n):
    if res != s[i]:
        res = s[i]
        count += 1
print(count)

Solution (Python):
n = int(input())
S = input()
c = 1
for i in range(1, n):
    if S[i] != S[i-1]:
        c += 1
print(c)

Solution (Python):
n=int(input())
s=input()
cnt=1
for i in range(n-1):
    if s[i]!=s[i+1]:
        cnt+=1
print(cnt)

Solution (Python):
N = int(input())
S = str(input())

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

Solution (Python):
N = int(input())
S = list(input())
ans = len(S)
cur = S[0]

for i in range(1, N):
    if cur == S[i]:
        ans -= 1
    else:
        cur = S[i]

print(ans)

Solution (Python):
n=int(input())
s=input()
ans=1
b_c=s[0]
for i in s[1:]:
  if b_c!=i:
    ans+=1
  b_c=i
print(ans)

Solution (Python):
n = int(input())
s = list(input())

ans = [s[0]]
for i in range(n - 1):
    if s[i] != s[i + 1]:
        ans.append(s[i + 1])

print(len(''.join(ans)))

Solution (Python):
n = int(input())
s = input()
count = 1

for i in range(1,n):
    if s[i-1] != s[i]:
        count += 1

print(count)

Solution (Python):


def main():
    n = int(input())
    s = input()
    cnt = 1
    for i in range(n-1):
        if s[i] != s[i+1]:
            cnt += 1
    print(cnt)   
main()

Solution (Python):
n = int(input())
s = input()
y = 1
p = s[0]
for i in range(1, n):
    if s[i] != p:
        y += 1
        p = s[i]
print(y)

Solution (Python):
N = int(input())
S = list(input())

letter = S[0]
for i in range(1, N):
    if S[i-1] != S[i]:
        letter += S[i]
print(len(letter))

Solution (Python):
n = int(input())

chars = list(input())

if n == 0:
    print(0)
elif n == 1:
    print(1)
else:
    slime_num = 1
    idx_0 = 0
    idx_1 = 1
    
    while idx_1 < n:
        if chars[idx_0] != chars[idx_1]:
            slime_num += 1
        idx_1 += 1
        idx_0 += 1
    
    print(slime_num)

Solution (Python):
def main():
    N = int(input())
    S = input()
    s = ''
    r = 0
    for i in S:
        if s == i:
            continue
        s = i
        r += 1
    print(r)
main()

Solution (Python):
n=int(input())
s=list(map(str,input()))
c=0
for i in range(len(s)-1):
  if s[i]==s[i+1]:
    c+=1
  else:continue
print(n-c)

Solution (Python):
n = int(input())
s = input()
ans = 0

for i in range(n):
    if not i+1 >= n and s[i]==s[i+1]:
        pass
    else:
        ans+=1
print(ans)

Solution (Python):
N = int(input())
S = list(input())
mix = []

now = S[0]
for i in range(1,len(S)):
    if now != S[i]:
        mix.append(now)
        now = S[i]

print(len(mix)+1)

Solution (Python):
n = int(input())
s = list(input())
count = 1
for i in range(n-1):
    if s[i] != s[i + 1]:
        count += 1
print(count)

Solution (Python):
N = int(input())
S = input()
count =0
for i in range(N-1):
  if S[i] == S[i+1]:
    count += 1
print(N-count)

Solution (Python):
N=int(input())
S=input()
c=1
for i in range(1,N):
  if S[i-1]!=S[i]:
    c+=1
print(c)

Solution (Python):
n=int(input())
s=input()
ans=1
for i in range(n-1):
    if s[i]!=s[i+1]:
        ans+=1
print(ans)

Solution (Python):
n = int(input())
s = str(input())
slime = n

for i in range(1,n):
    color1 = s[i-1]
    color2 = s[i]

    if color1==color2:
        slime -= 1

print(slime)

Solution (Python):
n = int(input())
s = input()
d = ' '
cnt = 0
for i in list(s):
    if i != d:
        cnt += 1
        d = i
print (cnt)

Solution (Python):
n=int(input())
s=str(input())
p=[s[0]]
for i in range(1,n):
  if s[i]!=s[i-1]:
    p.append(s[i])
print(len(p))

Solution (Python):
n = int(input())
s = input()

ans = n

for i in range(n-1):
    if s[i] == s[i+1]:
        ans -= 1
print(ans)

Solution (Python):
N = int(input())
S = input()
c = 0
for i in range(0,N-1):
    if S[i] == S[i+1]:
        c = c+1
print (N-c)

Solution (Python):
N=int(input())
S=input()
number=1

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

Solution (Python):
N = int(input())
S = input()

let = [S[0]]
for i in range(1, N):
    if S[i] != let[-1]:
        let.append(S[i])
        
print(len(let))

Solution (Python):
N=int(input())
S=input()
a=1
for i in range(0,N-1):
    if S[i]!=S[i+1]:
        a+=1
print(a)

Solution (Python):
from itertools import groupby
input()
s=input()
print(len(list(groupby(s))))

Solution (Python):
import itertools
import math
import sys

n = int(input())
s = input()
index = 1
ans = 1
last_letter = s[0]
while index < n:
    if s[index] != last_letter:
        ans += 1
        last_letter = s[index]
    index += 1
print(ans)

Solution (Python):
N = int(input())
S = list(input())

ans = [1]
tmp = S[0]
cnt = 0
for s in S[1:]:
    if tmp == s:
        cnt += 1
        tmp = s

    else:
        ans.append(cnt)
        cnt = 0
        tmp = s

print(len(ans))

Solution (Python):
n = int(input())
s = input()
ans = 1
for i in range(n-1):
    if s[i] != s[i+1]:
        ans+=1
print(ans)

Solution (Python):
N=int(input())
S=input()
mozi=list(S)
n=0
cnt=0
while n<N-1 :
    if mozi[n]==mozi[n+1]:
        cnt+=1
    n+=1
print(N-cnt)

Solution (Python):
N = int(input())
S = input()

ans = N

for i, s in enumerate(S[1:]):
  if s==S[i]:
    ans -= 1
    
print(ans)

Solution (Python):
"""
author : halo2halo
date : 4, Feb, 2020
"""

import sys



read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

N = int(readline())
S = [str(i) for i in readline().decode('utf8').strip()]
ans = 0
for s, t in zip(S, S[1:]):
    if s != t:
        ans += 1
print(ans + 1)

Solution (Python):
def main():
    N=int(input())
    S=input()
    s=0
    if N==1:
        print(1)
    else:
        s=1
        for i in range(0,N-1):
            if S[i]!=S[i+1]:
                s=s+1
        print(s)

if __name__ == '__main__':
    main()

Solution (Python):
N=int(input())
S=input()
ans = 0
for i in range(N-1):
    if S[i]!=S[i+1]:
        ans+=1

print(ans+1)

Solution (Python):
n = int(input())
S = input()
cnt = len(S)
for i in range(cnt-1):
    if S[i] == S[i+1]:
      cnt -= 1
print(cnt)

Solution (Python):
n = int(input())
s = input()
count = 1
for i in range(1,n):
    if s[i] != s[i-1]:
        count += 1
print(count)

Solution (Python):
N = int(input())
S = list(input())
count = 1
for i in range(len(S)-1):
    if S[i] != S[i+1]:
        count += 1
print(count)

Solution (Python):
def main(n, s):
    removeCount = 0
    for i in range(1, len(s)):
        if s[i] == s[i-1]:
            removeCount += 1
    return n - removeCount

n = int(input())
s = list(input())
print(main(n,s))

Solution (Python):
N = int(input())
S = input()

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

Solution (Python):
n = int(input())
s = input()
cnt = 1
for i in range(n-1):
  if s[i] != s[i+1]:
    cnt += 1

print(cnt)

Solution (Python):
n = int(input())
s = list(input())

check = 0
for i in range(n - 1):
  if s[i] == s[i + 1]:
    check += 1

print(n-check)

Solution (Python):
n = int(input())
sl = list(input())
ss = []

if n == 1:
    print(1)
else:
    for i in range(1, n):
        if sl[i] != sl[i-1]:
            ss.append(sl[i-1])
        if i == n-1:
            ss.append(sl[i])
    print(len(ss))

Solution (Python):
n = int(input())
s = input()
ans = 1

for i in range(1,n):
    if s[i] != s[i-1]:
        ans += 1
        
print(ans)

Solution (Python):
n=int(input())
s=str(input())
count=1
col=s[0]
for next in s[1:]:
  if next!=col:
    count+=1
    col=next
print(count)

Solution (Python):
import itertools
n=int(input())
s=str(input())
slime=itertools.groupby(s)
count=0
for key,value in slime:
  count+=1
print(count)

Solution (Python):
n = int(input())
s = input()
count = 1
for i in range(n - 1):			
	if (s[i] != s[i + 1]):
		count+=1
print(count)

Solution (Python):
n = int(input())
s = input()
cnt = 1

for i in range(n-1):
  if s[i] != s[i+1]:
    cnt += 1
    
print(cnt)

Solution (Python):
N = int(input())
S = list(input())

ans = 0
pre_s = ''
for s in S:
    if s == pre_s:
        continue
    else:
        pre_s = s
        ans += 1
print(ans)

Solution (Python):
n = int( input() )
s = input()

cnt = 1
for i in range( 1, n ):
    if s[ i ] != s[ i - 1 ]:
        cnt += 1
print( cnt )

Solution (Python):
n=int(input())
sl=list(input())

count=1

for i in range(n-1):
    if sl[i]!=sl[i+1]:
        count+=1
print(count)

Solution (Python):
N = int(input())
S = input()
count = 1
color = S[0]
for s in S:
  if s != color:
    count += 1
    color = s
print(count)

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def IS(): return sys.stdin.readline()[:-1]
def II(): return int(sys.stdin.readline())
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LI1(): return list(map(int1, sys.stdin.readline().split()))
def LII(rows_number): return [II() for _ in range(rows_number)]
def LLI(rows_number): return [LI() for _ in range(rows_number)]
def LLI1(rows_number): return [LI1() for _ in range(rows_number)]

def main():
	N = II()
	S = IS()
	ls = [S[0]]
	for s in S[1:]:
		if(ls[-1]!=s):
			ls.append(s)
	print(len(ls))

main()

Solution (Python):
n = int(input())
s = list(input())
ans = []

for i in range(1,len(s)):
    if s[i-1]==s[i]:
        s[i-1] = "" 
        
for i in range(n):
    if s[i] != "":
        
        ans.append(s[i])
moji = ''.join(ans)
print(len(moji))

Solution (Python):
N = int(input())
S = list(input())

ans = 1
for i in range(N):
    if i == N - 1:
        print(ans)
    elif S[i] == S[i + 1]:
        continue
    else:
        ans += 1

Solution (Python):
N = int(input())
S = list(input())

ans = 1
for i in range(N):
    if i == N - 1:
        print(ans)
    elif S[i] == S[i + 1]:
        i += 1
        continue
    else:
        ans += 1
        i += 1

Solution (Python):
n = int(input())
s = input()
d = 1
for i in range(n-1):
  d += int(s[i] != s[i+1])
print(d)

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
S = input()

for i in range(len(ascii_lowercase)):
	S = re.sub(ascii_lowercase[i] + "+", ascii_lowercase[i], S)

print(len(S))

Solution (Python):
input()
slimes = input()

count = 1

be = slimes[0]
for x in slimes[1:]:
  if be != x:
    count += 1
    be = x

print(count)

Solution (Python):
N = int(input())
S = input()

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

print(count)

Solution (Python):
n = int(input())
s = input()
ans = 1
for i in range(1, n):
    if s[i - 1] != s[i]:
        ans += 1
print(ans)

Solution (Python):
N = int(input())
S = input()

l = [S[0]]
for s in S[1:]:
    if s!=l[-1]:
        l.append(s)

print(len(l))

Solution (Python):
n = int(input())
s = input()
ans = 1

for i in range(n - 1):
    if s[i] != s[i + 1]:
        ans += 1
print(ans)

Solution (Python):
n = int(input())
s = input()

result = 1
for i in range(1, n):
  if s[i] != s[i-1]:
    result += 1

print(result)

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

    ans = 0;
    c = None
    for s in S:
        if s != c:
            c = s
            ans += 1
    print(ans)

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
s = list(input())
l = len(s)
n = 1
for i in range(1, l):
  if not s[i-1] == s[i]:
    n += 1
print(n)

Solution (Python):
N = int(input())
S = input()

t = S[0]
ans = 1
for i in range(1, N):
    if t == S[i]:
        continue
    t = S[i]
    ans += 1

print(ans)

Solution (Python):
n = int(input())
s = input()
count = 1
for i in range(n-1):
  if s[i] != s[i+1]:
    count += 1
print(count)

Solution (Python):
n = int(input())
s = input()
ans = 1
for i in range(n-1):
    if s[i]!=s[i+1]:
        ans += 1
print(ans)

Solution (Python):
n=int(input())
d=list(input())
c=d[0]
l=[d[0]]
for x in range(n-1):
    if c!=d[x+1]:
        l.append(d[x+1])
        c=d[x+1]
print(len(l))

Solution (Python):

import sys


def solve(N: int, S: str):
    p = S[0]
    r = [S[0]]
    for i in range(1, N):
        if p != S[i]:
            r.append(S[i])
            p = S[i]
    return r


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    S = next(tokens)  
    print(len(solve(N, S)))

if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
s = input()

ans = 1
now = s[0]

for i in range(1,n):
	if now != s[i]:
		now = s[i]
		ans += 1

print(ans)

Solution (Python):
N = int(input())
S = input()

def run_length(s) -> list:
  res = [[s[0], 1]]
  for i in range(1, len(s)):
    if res[-1][0] == s[i]:
      res[-1][1] += 1
    else:
      res.append([s[i], 1])
  return res

print(len(run_length(S)))

Solution (Python):
N = input()
S = raw_input()

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

Solution (Python):
n = int(input())
s = input()

i = 0
while i+1 < len(s):
    j = i + 1
    if s[i] == s[j]:
        s = s[0:i] + s[i] + s[i+2:]
    else:
        i += 1

print(len(s))

Solution (Python):
N = int(input())
S = input()
count = 0
for i in range(1, N):
  if S[i - 1] == S[i]:
    count += 1
print(N - count)

Solution (Python):
n = int(input())
s = input()
cnt = 0
temp = None
for i in range(n):
    if s[i] != temp:
        cnt += 1
    temp = s[i]
print(cnt)

Solution (Python):
N = int(input())
S = list(input())
count = 1
tmp = S[0]
for i in range(1,N):
    if tmp == S[i]:
        continue
    else:
        tmp = S[i]
        count = count + 1
print(count)

Solution (Python):
N = int(input())
S = input()
seen = S[0]
res = 1
for c in S:
    if c != seen:
        seen = c
        res += 1
print(res)

Solution (Python):
N = int(input())
S = input()

buf = ""
count = 0
for s in S:
    if s != buf:
        count += 1
    buf = s

print(count)

Solution (Python):
def solve(n, s):
    count = 0
    prev = ''
    for l in s:
        if l != prev:
            count += 1
        prev = l
    return count

_n = int(input())
_s = input()
print(solve(_n, _s))

Solution (Python):
n = int(input())
S = input()
prev = "@"
res = ""
for i in range(n):
    if S[i] != prev:
        res += S[i]
    prev = S[i]

print(len(res))

Solution (Python):
import itertools
import sys

input = sys.stdin.readline

ri = lambda: int(input())
rs = lambda: input().rstrip()
ril = lambda: list(map(int, input().split()))
rsl = lambda: input().rstrip().split()
ris = lambda n: [ri() for _ in range(n)]
rss = lambda n: [rs() for _ in range(n)]
rils = lambda n: [ril() for _ in range(n)]
rsls = lambda n: [rsl() for _ in range(n)]

n = ri()
s = rs()
print(len(list(itertools.groupby(s))))

Solution (Python):
N = int(input())
S = list(input())
r=1
for i in range(1,N):
	if not(S[i-1]==S[i]):
		r+=1 
print(r)

Solution (Python):
N = int(input())
S = list(input())
r=0
for i in range(1,N):
	if not(S[i-1]==S[i]):
		r+=1 
print(r+1)

Solution (Python):
N = int(input())
S = list(input())

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

print(N - cnt)

Solution (Python):
def resolve():
    N = int(input())
    S = input()

    S_list = list(S)

    answer_list = []
    answer_list.append(S_list[0])

    for i in range(len(S_list) - 1):
        if answer_list[-1] != S_list[i+1]:
            answer_list.append(S_list[i+1])


    print(len(answer_list))

if __name__ == "__main__":
    resolve()

Solution (Python):
n = int(input())

li = list(input())

count = 0
for i in range(len(li)-1):
    if li[i] == li[i+1]:
        count = count + 1

print(n-count)

Solution (Python):
n = int(input())
s = str(input())

check = 0

for i in range(n-1):
    if s[i] == s[i+1]:
        check += 1
        
print(n - check)

Solution (Python):
N = input()
S = input()
temp = ""
lst = ""
for cnt in S:
    if temp != cnt:
        temp = cnt
        lst += cnt
print(len(lst))

Solution (Python):
N = int(input())
S = input()

prev_color = S[0]
res = prev_color
for color in list(S)[1:]:
    if color != prev_color:
        res += color
        prev_color = color

print(len(res))

Solution (Python):
_ = input()
s = input()

over = False


def process_slimes(s):
    res = ""
    curr = None
    over = True
    count = 0

    for c in s:
        if not curr:
            curr = c
            count += 1
        elif c != curr:
            res += curr
            curr = c
            count += 1
        else:
            over = False
    res += curr

    return res, count, over


while not over:
    s, count, over = process_slimes(s)

print(count)

Solution (Python):

import sys


def solve(N: int, S: str):
    p = 0
    pre = S[0]
    for i in range(1,N):
        if S[i] == pre:
            p += 1
        pre = S[i]
    print(N - p)

    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    S = next(tokens)  
    solve(N, S)

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
S = input()

ans = 0
pre_s = '_'
for n in range(0,N):
  _ = S[n]
  if pre_s == _:
    ans += 1
  
  pre_s = _

print(N-ans)

Solution (Python):
N = int(input())
S = list(input())

count = 1

for index, s in enumerate(S):
  if index + 1 > len(S) - 1:
    break
  
  if S[index] != S[index+1]:
    count += 1

print(count)

Solution (Python):
n = int(input())
s = input()

temp = s[0]
count = 0
for i in range(1, len(s)):
  if s[i] != temp:
    count += 1
  temp = s[i]
print(count + 1)

Solution (Python):

import sys
import math
import os
import itertools
import _collections
import string
from functools import lru_cache
import heapq

class cin():
    def int():
        return int(sys.stdin.readline().rstrip())
    def string():
        return sys.stdin.readline().rstrip()
    def mapInt():
        return [int(x) for x in cin.string().split()]
    def stringList(n):
        return [input() for i in range(n)]
    def intListList(n):
        return [cin.mapInt() for i in range(n)]
    def intColsList(n):
        return [int(input()) for i in range(n)]
        
class Math():
    def gcd(a,b):
        if b == 0:
            return a
        return Math.gcd(b,a % b)
    def lcm(a,b):
        return (a * b) // Math.gcd(a,b)
    def roundUp(a,b):
        return -(-a // b)
    def toUpperMultiple(a,x):
        return Math.roundUp(a,x) * x
    def toLowerMultiple(a,x):
        return (a // x) * x
    def nearPow2(n):
        if n <= 0:
            return 0
        if n & (n - 1) == 0:
            return n
        ret = 1
        while(n > 0):
            ret <<= 1
            n >>= 1
        return ret

MOD = int(1e09) + 7

def main():
    N = cin.int()
    S = cin.string()
    ans = 1
    for i in range(N - 1):
        if S[i + 1] != S[i]:
            ans+=1
    print(ans)
    return

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
ss = input()

ans = 1
s_before = ss[0]
for s in ss:
    if s != s_before:
        ans += 1
        s_before = s

print(ans)

Solution (Python):
n = int(input())
s = input()
cnt = 1
for i in range(1, n):
    if s[i] != s[i -1]:
        cnt += 1
print(cnt)

Solution (Python):
N = int(input())
S = input()

ans = 0
tmp = ''
for i in S:
    if tmp != i:
        ans += 1
    tmp = i

print(ans)

Solution (Python):
d = int(input())
s = input()

count = 1
for i in range(d-1):
  if s[i:i+1] != s[i+1:i+2]:
    count+=1
print(count)

Solution (Python):
n = int(input())
s = list(input())

i = 1
while i < len(s):
    if s[i] == s[i-1]:
        s.pop(i)
    else:
        i += 1

print(len(s))

Solution (Python):
N = int(input())
S = input()
count = 1

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

Solution (Python):
N=int(input())
d=list(input())

for i in range(N-1):
  if d[i]==d[i+1]:
    d[i]='_'
d=[j for j in d if j!='_']
print(len(d))

Solution (Python):
n=int(input())
S=input()
cnt=0
tmp=''
for i in range(n):
    if tmp != S[i]:
        cnt += 1
        tmp =S[i]
print(cnt)

Solution (Python):
N=int(input())
S=input()
count=0
a=""

for i in range(N):
   if a!=S[i]:
      a=S[i]
      count+=1
print(count)

Solution (Python):
def main():
    n = int(input())
    s = input()

    ls = [s[0]]

    index = 1

    while(n -1 >= index):
        if ls[len(ls)-1] != s[index]:
            ls.append(s[index])
        index += 1

    print(len(ls))

if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
S = str(input())
ans = 1

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

print(ans)

Solution (Python):
N = int(input())
s = input()
r = []
ans = 1
for i in range(len(s)):
  r.append(s[i])
for i in range(N-1):
  if r[i] != r[i+1]:
    ans += 1
print(ans)

Solution (Python):
n = int(input())
s = input()
color_species = 1
for i in range(n-1):
  if s[i] != s[i + 1]:
    color_species += 1

print(color_species)

Solution (Python):
n = int(input())
s = input()
count = 1

for i in range(n-1):
    if s[i] != s[i+1]:
        count += 1

print(count)

Solution (Python):
n = int(input())
s = input()

cnt = 1
for i in range(0, n-1):
    if s[i] != s[i+1]:
        cnt += 1

print(cnt)

Solution (Python):
import sys

N = int(input())
S = input()

temp = 1
ansarray = []
counter = 0
if N == 1:
    print(1)
    sys.exit()


for i in range(1, N):
    counter += 1
    if S[i] == S[i - 1]:
        temp += 1
    else:
        ansarray.append(temp)
        temp = 1
    if counter == N-1:
        ansarray.append(temp)
        print(len(ansarray))

Solution (Python):
n = int(input())
s = list(input())
t = 1
for i in range(0,n-1):
  if s[i] == s[i+1]:
    t += 0
  else:
    t += 1
print(t)

Solution (Python):
N = int(input())
*S, = input()
ans = [S[i] for i in range(N-1) if S[i] != S[i+1]]
ans.append(S[-1])
print(len(ans))

Solution (Python):
n = int(input())
S = list(input())
total = n
past = ""
for i in range(n):
  if past == S[i]:
    total -= 1
  past = S[i]
print(total)

Solution (Python):
n = int(input())
s = input()

string = s[0]

for x in range(1, n):
    if string[-1] == s[x]:
        pass
    else:
        string = string + s[x]

print(len(string))

Solution (Python):
n = int(input())
s = input()
cnt = n
for i in range(n - 1):
    if s[i] == s[i + 1]:
        cnt -= 1
print(cnt)

Solution (Python):
N = int(input())
S = input()
count = 0

for i in range(N-1):
    if (S[i] == S[i+1]):
        continue
    else:
        count += 1

count += 1
print(count)

Solution (Python):
N = int(input())
S = input()

ans = [S[0]]
pre = S[0]

for e in S[1:]:
    if e != pre:
        ans.append(e)
        pre = e


print(len(ans))

Solution (Python):
N = int(input())
S =list(map(str, input()))
ans = 1
for i in range(N-1):
    if S[i]!=S[i+1]:
        ans += 1       
print(ans)

Solution (Python):
import sys, re, os
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd
 
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def S_MAP(): return map(str, input().split())
def LIST(): return list(map(int, input().split()))
def S_LIST(): return list(map(str, input().split()))
 
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

n = INT()
s = input()
color = 0
ans = 0
for i in range(n):
  if i == 0:
    color = s[0]
    ans = 1
  else:
    if color != s[i]:
      color = s[i]
      ans += 1
print(ans)

Solution (Python):
from itertools import groupby
_ = input()
print(len(tuple(groupby(input()))))

Solution (Python):
from functools import reduce
_ = input()
S = input()
print(len(reduce(lambda a, b: a if a[-1] == b else a + b , S[1:], S[0])))

Solution (Python):
n = int(input())
s = [c for c in input()]

for i in range(n-1,0,-1):
  if s[i] == s[i-1]:
    s.pop(i)

print(len(s))

Solution (Python):
n=int(input())
s = list(input())


if len(s) == 1:
    print(1)
else:
    a=1
    for i in range(1, n):
        if s[i] != s[i-1]:
            a += 1
        else:
            continue
    print(a)

Solution (Python):
N=int(input())
S=str(input())
count=1
for i in range(N-1):
    if S[i]!=S[i+1]:
        count+=1
print(count)

Solution (Python):

import numpy as np
def fnSolv():
  input()
  s = input()
  sP = "0"
  iRet = 0
  for s0 in s:
    if s0 != sP:
      iRet += 1
    sP = s0
  print(iRet)
if __name__ == '__main__':
  fnSolv()

Solution (Python):
n=int(input())
s=input()

result=1

for i in range(1,n):
    if s[i]!=s[i-1]:
        result+=1

print(result)

Solution (Python):
n=int(input())
s=input()
if n==1:
    print(1)
else:
    slist=[]
    for i in range(len(s)):
        slist.append(s[i])
    
    for i in range(len(s)-1,0,-1):
        if slist[i-1]==slist[i]:
            del slist[i]

    print(len(slist))

Solution (Python):
n = int(input())
d = list(input())
cnt = 1
m = d[0]
for i in d:
    if i == m:
        continue
    else:
        m = i
        cnt +=1
print(cnt)

Solution (Python):
n = int(input())
s = input()
ans = 1
for i in range(len(s)-1):
  if s[i]==s[i+1]:
    continue
  else:
    ans += 1
print(ans)

Solution (Python):
n = int(input())
s = str(input())
s = list(s)

count = 1
for i in range(1,n):
    if s[i-1] != s[i]:
        count += 1
print(count)

Solution (Python):
N = int(input())
S = input()
ct = 1
last_c = S[0]
for c in S[1:]:
    if last_c == c:
        continue
    else:
        last_c = c
        ct += 1
print(ct)

Solution (Python):
n = int(input())
colors = input()

s = 1

for i in range(0, n-1):
  if colors[i] != colors[i+1]:
    s = s + 1
    
print(s)

Solution (Python):
N = int(input())
S = list(input())

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

print(res)

Solution (Python):
N = int(input())
S = input()
ans = 1
now = S[0]
for i in range(1,N):
    if now != S[i]:
        ans += 1
        now = S[i]
print(ans)

Solution (Python):
N = int(input())
S = input()
ans = 1
for i in range(N-1):
  if(S[i+1] != S[i]):
    ans += 1
print(ans)