n = int(input())
s = input()

count = 0
for i in range(n):
    if(s[i] == "R"):
        count += 1

count2 = 0
for i in range(count):
    if(s[i] == "W"):
        count2 += 1

print(count2) n = int(input()) n int(input()) int input() input s = input() s input() input count = 0 count 0 for i in range(n):
    if(s[i] == "R"):
        count += 1 i range(n) range n if(s[i] == "R"):
        count += 1 s[i] == "R" s[i] s i "R" count += 1 count 1 count2 = 0 count2 0 for i in range(count):
    if(s[i] == "W"):
        count2 += 1 i range(count) range count if(s[i] == "W"):
        count2 += 1 s[i] == "W" s[i] s i "W" count2 += 1 count2 1 print(count2) print count2 count2 = 0 0 count2 count2 += 1 1 count2 s = input() input() s n = int(input()) int(input()) n count += 1 1 count count = 0 0 count
n = int(input())
s = input()

count = 0
for i in range(n):
    if(s[i] == "R"):
        count += 1

count2 = 0
for i in range(count):
    if(s[i] == "W"):
        count2 += 1

print(count2)