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