N = int(input())
C = input()

tmp = 0
for i in range(N):
    if C[i] == "R":
        tmp += 1

ans = 0
for i in range(tmp):
    if C[i] == "W":
        ans += 1
print(ans) N = int(input()) N int(input()) int input() input C = input() C input() input tmp = 0 tmp 0 for i in range(N):
    if C[i] == "R":
        tmp += 1 i range(N) range N if C[i] == "R":
        tmp += 1 C[i] == "R" C[i] C i "R" tmp += 1 tmp 1 ans = 0 ans 0 for i in range(tmp):
    if C[i] == "W":
        ans += 1 i range(tmp) range tmp if C[i] == "W":
        ans += 1 C[i] == "W" C[i] C i "W" ans += 1 ans 1 print(ans) print ans tmp = 0 0 tmp C = input() input() C N = int(input()) int(input()) N ans = 0 0 ans ans += 1 1 ans tmp += 1 1 tmp
N = int(input())
C = input()

tmp = 0
for i in range(N):
    if C[i] == "R":
        tmp += 1

ans = 0
for i in range(tmp):
    if C[i] == "W":
        ans += 1
print(ans)