number = int(input())
date = input()
date = list(date)
cnt =0
cnt2 =0

for i in range(number):
  if date[i] =="R":
    cnt +=1

for s in range(cnt):
  if date[s] =="W":
    cnt2 +=1
print(cnt2) number = int(input()) number int(input()) int input() input date = input() date input() input date = list(date) date list(date) list date cnt =0 cnt 0 cnt2 =0 cnt2 0 for i in range(number):
  if date[i] =="R":
    cnt +=1 i range(number) range number if date[i] =="R":
    cnt +=1 date[i] =="R" date[i] date i "R" cnt +=1 cnt 1 for s in range(cnt):
  if date[s] =="W":
    cnt2 +=1 s range(cnt) range cnt if date[s] =="W":
    cnt2 +=1 date[s] =="W" date[s] date s "W" cnt2 +=1 cnt2 1 print(cnt2) print cnt2 number = int(input()) int(input()) number cnt =0 0 cnt cnt +=1 1 cnt cnt2 +=1 1 cnt2 cnt2 =0 0 cnt2 date = input() input() date date = list(date) list(date) date
number = int(input())
date = input()
date = list(date)
cnt =0
cnt2 =0

for i in range(number):
  if date[i] =="R":
    cnt +=1

for s in range(cnt):
  if date[s] =="W":
    cnt2 +=1
print(cnt2)