n = int(input())
c = input()
red = 0
white = 0
for i in range(n):
    if c[i] == "R":
        red += 1
for i in range(red):
    if c[i] == "W":
        white += 1
print(white) n = int(input()) n int(input()) int input() input c = input() c input() input red = 0 red 0 white = 0 white 0 for i in range(n):
    if c[i] == "R":
        red += 1 i range(n) range n if c[i] == "R":
        red += 1 c[i] == "R" c[i] c i "R" red += 1 red 1 for i in range(red):
    if c[i] == "W":
        white += 1 i range(red) range red if c[i] == "W":
        white += 1 c[i] == "W" c[i] c i "W" white += 1 white 1 print(white) print white white += 1 1 white white = 0 0 white red += 1 1 red n = int(input()) int(input()) n red = 0 0 red c = input() input() c
n = int(input())
c = input()
red = 0
white = 0
for i in range(n):
    if c[i] == "R":
        red += 1
for i in range(red):
    if c[i] == "W":
        white += 1
print(white)
