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

y = 0
if x != 0:
    for j in range(x):
        if c[j] == "W":
            y += 1

print(y) n = int(input()) n int(input()) int input() input c = input() c input() input x = 0 x 0 for i in range(n):
    if c[i] == "R":
        x += 1 i range(n) range n if c[i] == "R":
        x += 1 c[i] == "R" c[i] c i "R" x += 1 x 1 y = 0 y 0 if x != 0:
    for j in range(x):
        if c[j] == "W":
            y += 1 x != 0 x 0 for j in range(x):
        if c[j] == "W":
            y += 1 j range(x) range x if c[j] == "W":
            y += 1 c[j] == "W" c[j] c j "W" y += 1 y 1 print(y) print y x = 0 0 x n = int(input()) int(input()) n c = input() input() c x += 1 1 x y += 1 1 y y = 0 0 y
n = int(input())
c = input()
x = 0
for i in range(n):
    if c[i] == "R":
        x += 1

y = 0
if x != 0:
    for j in range(x):
        if c[j] == "W":
            y += 1

print(y)