n=int(eval(input()))

s=eval(input())



from collections import Counter



c=Counter(s)



r=c['R']



cnt=0

for i in range(r):

    if s[i]=='W':

        cnt+=1





print(cnt)
n=int(eval(input()))

s=eval(input())



r = s.count('R')



ans=0

for i in range(r):

    if s[i]=='W':

        ans+=1



print(ans)
n = int(eval(input()))
s = eval(input())
from collections import Counter

c = Counter(s)
r = c["R"]
cnt = 0
for i in range(r):
    if s[i] == "W":
        cnt += 1
print(cnt)

n = int(eval(input()))
s = eval(input())
r = s.count("R")
ans = 0
for i in range(r):
    if s[i] == "W":
        ans += 1
print(ans)

-from collections import Counter - -c = Counter(s) -r = c["R"] -cnt = 0 +r = s.count("R") +ans = 0 -        cnt += 1 -print(cnt) +        ans += 1 +print(ans)