n,c=eval(input()),eval(input());print((c[:c.count('R')].count('W')))
i=input;n,c=i(),i();print((c[:c.count('R')].count('W')))
n, c = eval(input()), eval(input())
print((c[: c.count("R")].count("W")))

i = input
n, c = i(), i()
print((c[: c.count("R")].count("W")))

-n, c = eval(input()), eval(input()) +i = input +n, c = i(), i()