# coding: utf-8
N = int(input())
C = list(input())

R_cnt = 0

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

ans = 0

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

print(ans)
 N = int(input()) N int(input()) int input() input C = list(input()) C list(input()) list input() input R_cnt = 0 R_cnt 0 for i in range(N):
    if C[i] == "R":
        R_cnt += 1 i range(N) range N if C[i] == "R":
        R_cnt += 1 C[i] == "R" C[i] C i "R" R_cnt += 1 R_cnt 1 ans = 0 ans 0 for i in range(R_cnt):
    if C[i] == "W":
        ans += 1 i range(R_cnt) range R_cnt if C[i] == "W":
        ans += 1 C[i] == "W" C[i] C i "W" ans += 1 ans 1 print(ans) print ans R_cnt = 0 0 R_cnt C = list(input()) list(input()) C ans = 0 0 ans ans += 1 1 ans N = int(input()) int(input()) N R_cnt += 1 1 R_cnt
# coding: utf-8
N = int(input())
C = list(input())

R_cnt = 0

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

ans = 0

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

print(ans)

