

N = int(eval(input()))

S = list(eval(input()))



cnt = S.count("R")

ans = S[cnt:].count("R")

print(ans)



N = int(eval(input()))

S = eval(input())



c = S.count("R")

res = S[c:].count("R")

print(res)

N = int(eval(input()))
S = list(eval(input()))
cnt = S.count("R")
ans = S[cnt:].count("R")
print(ans)

N = int(eval(input()))
S = eval(input())
c = S.count("R")
res = S[c:].count("R")
print(res)

-S = list(eval(input())) -cnt = S.count("R") -ans = S[cnt:].count("R") -print(ans) +S = eval(input()) +c = S.count("R") +res = S[c:].count("R") +print(res)