N = int(input())
Stones = list(input())

count_red = 0
count_white = 0

for i in range(N):
  if Stones[i] == "R":
    count_red += 1
    
for i in range(count_red):
  if Stones[i] == "W":
    count_white += 1
    
print(count_white) N = int(input()) N int(input()) int input() input Stones = list(input()) Stones list(input()) list input() input count_red = 0 count_red 0 count_white = 0 count_white 0 for i in range(N):
  if Stones[i] == "R":
    count_red += 1
     i range(N) range N if Stones[i] == "R":
    count_red += 1
     Stones[i] == "R" Stones[i] Stones i "R" count_red += 1 count_red 1 for i in range(count_red):
  if Stones[i] == "W":
    count_white += 1
     i range(count_red) range count_red if Stones[i] == "W":
    count_white += 1
     Stones[i] == "W" Stones[i] Stones i "W" count_white += 1 count_white 1 print(count_white) print count_white N = int(input()) int(input()) N count_white = 0 0 count_white count_red = 0 0 count_red count_white += 1 1 count_white Stones = list(input()) list(input()) Stones count_red += 1 1 count_red
N = int(input())
Stones = list(input())

count_red = 0
count_white = 0

for i in range(N):
  if Stones[i] == "R":
    count_red += 1
    
for i in range(count_red):
  if Stones[i] == "W":
    count_white += 1
    
print(count_white)