N=int(input())
c=input()
count=0

if 'WR' in c:
    x=c.count('R')
    y=c.count('R',0,x)
    count=x-y
print(count) N=int(input()) N int(input()) int input() input c=input() c input() input count=0 count 0 if 'WR' in c:
    x=c.count('R')
    y=c.count('R',0,x)
    count=x-y 'WR' in c 'WR' c x=c.count('R') x c.count('R') c.count c count 'R' y=c.count('R',0,x) y c.count('R',0,x) c.count c count 'R' 0 x count=x-y count x-y x y print(count) print count count=0 0 count y=c.count('R',0,x) c.count('R',0,x) y N=int(input()) int(input()) N count=x-y x-y count x=c.count('R') c.count('R') x c=input() input() c
N=int(input())
c=input()
count=0

if 'WR' in c:
    x=c.count('R')
    y=c.count('R',0,x)
    count=x-y
print(count)