n = int(input())
c = input()
cnt = 0
ans = 0
for i in range(n):
    if(c[i]=='R'):
        cnt+=1
for i in range(cnt):
    if(c[i]=='W'):
        ans+=1
print(ans) n = int(input()) n int(input()) int input() input c = input() c input() input cnt = 0 cnt 0 ans = 0 ans 0 for i in range(n):
    if(c[i]=='R'):
        cnt+=1 i range(n) range n if(c[i]=='R'):
        cnt+=1 c[i]=='R' c[i] c i 'R' cnt+=1 cnt 1 for i in range(cnt):
    if(c[i]=='W'):
        ans+=1 i range(cnt) range cnt if(c[i]=='W'):
        ans+=1 c[i]=='W' c[i] c i 'W' ans+=1 ans 1 print(ans) print ans ans = 0 0 ans n = int(input()) int(input()) n cnt = 0 0 cnt ans+=1 1 ans c = input() input() c cnt+=1 1 cnt
n = int(input())
c = input()
cnt = 0
ans = 0
for i in range(n):
    if(c[i]=='R'):
        cnt+=1
for i in range(cnt):
    if(c[i]=='W'):
        ans+=1
print(ans)