n=int(eval(input()))

c=eval(input())



cw=c.count('W')

cr=c.count('R')



ans_s='R'*cr+'W'*cw



cnt=0

for i in range(n):

  if c[i]!=ans_s[i]:

    cnt+=1



print(((cnt+2-1)//2))
n=int(eval(input()))

c=eval(input())



r_cnt=c.count('R')

w_cnt=c.count('W')



last_c='R'*r_cnt+'W'*w_cnt



num=0

for i in range(n):

  if c[i]!=last_c[i]:

    num+=1



print(((num+2-1)//2))
n = int(eval(input()))
c = eval(input())
cw = c.count("W")
cr = c.count("R")
ans_s = "R" * cr + "W" * cw
cnt = 0
for i in range(n):
    if c[i] != ans_s[i]:
        cnt += 1
print(((cnt + 2 - 1) // 2))

n = int(eval(input()))
c = eval(input())
r_cnt = c.count("R")
w_cnt = c.count("W")
last_c = "R" * r_cnt + "W" * w_cnt
num = 0
for i in range(n):
    if c[i] != last_c[i]:
        num += 1
print(((num + 2 - 1) // 2))

-cw = c.count("W") -cr = c.count("R") -ans_s = "R" * cr + "W" * cw -cnt = 0 +r_cnt = c.count("R") +w_cnt = c.count("W") +last_c = "R" * r_cnt + "W" * w_cnt +num = 0 -    if c[i] != ans_s[i]: -        cnt += 1 -print(((cnt + 2 - 1) // 2)) +    if c[i] != last_c[i]: +        num += 1 +print(((num + 2 - 1) // 2))