N= int(input())
c=list(str(input()))
#N=4
#c=['W', 'W', 'R', 'R']
#c.reverse()
#print(c)

t1=t2=True

n1=0
n2=0
num=0
while t1:
    t2=True
    if not 0<=N-1-n1<=N-1:
        t1=False
    if c[N-1-n1]=='W':
        n1+=1
        continue
    else:
        while t2:
            if c[n2]=='W':
                if n2<N-1-n1:
                    c[N-1-n1]='W'
                    c[n2]='R'
                    num+=1
                    t2=False
                    continue
                else:
                    t1=False 
            n2+=1
            if not 0<=n2<=N-1:
                t1=False
                t2=False
print(num)   N= int(input()) N int(input()) int input() input c=list(str(input())) c list(str(input())) list str(input()) str input() input t1=t2=True t1 True =t2=True t2 True n1=0 n1 0 n2=0 n2 0 num=0 num 0 while t1:
    t2=True
    if not 0<=N-1-n1<=N-1:
        t1=False
    if c[N-1-n1]=='W':
        n1+=1
        continue
    else:
        while t2:
            if c[n2]=='W':
                if n2<N-1-n1:
                    c[N-1-n1]='W'
                    c[n2]='R'
                    num+=1
                    t2=False
                    continue
                else:
                    t1=False 
            n2+=1
            if not 0<=n2<=N-1:
                t1=False
                t2=False t1 t2=True t2 True if not 0<=N-1-n1<=N-1:
        t1=False
     not 0<=N-1-n1<=N-1 0<=N-1-n1<=N-1 0<=N-1-n1 0 N-1-n1 N-1 N 1 n1 N-1 N 1 t1=False t1 False if c[N-1-n1]=='W':
        n1+=1
        continue
    else:
        while t2:
            if c[n2]=='W':
                if n2<N-1-n1:
                    c[N-1-n1]='W'
                    c[n2]='R'
                    num+=1
                    t2=False
                    continue
                else:
                    t1=False 
            n2+=1
            if not 0<=n2<=N-1:
                t1=False
                t2=False c[N-1-n1]=='W' c[N-1-n1] c N-1-n1 N-1 N 1 n1 'W' n1+=1 n1 1 continue while t2:
            if c[n2]=='W':
                if n2<N-1-n1:
                    c[N-1-n1]='W'
                    c[n2]='R'
                    num+=1
                    t2=False
                    continue
                else:
                    t1=False 
            n2+=1
            if not 0<=n2<=N-1:
                t1=False
                t2=False t2 if c[n2]=='W':
                if n2<N-1-n1:
                    c[N-1-n1]='W'
                    c[n2]='R'
                    num+=1
                    t2=False
                    continue
                else:
                    t1=False 
             c[n2]=='W' c[n2] c n2 'W' if n2<N-1-n1:
                    c[N-1-n1]='W'
                    c[n2]='R'
                    num+=1
                    t2=False
                    continue
                else:
                    t1=False 
             n2<N-1-n1 n2 N-1-n1 N-1 N 1 n1 c[N-1-n1]='W' c[N-1-n1] c N-1-n1 N-1 N 1 n1 'W' c[n2]='R' c[n2] c n2 'R' num+=1 num 1 t2=False t2 False continue t1=False t1 False n2+=1 n2 1 if not 0<=n2<=N-1:
                t1=False
                t2=False not 0<=n2<=N-1 0<=n2<=N-1 0<=n2 0 n2 N-1 N 1 t1=False t1 False t2=False t2 False print(num) print num t1=t2=True True t1 t1=False False t1 num+=1 1 num t2=False False t2 n1+=1 1 n1 n1=0 0 n1 t2=True True t2 t2=True True t2 c=list(str(input())) list(str(input())) c n2=0 0 n2 n2+=1 1 n2 num=0 0 num t2=False False t2 t1=False False t1 N= int(input()) int(input()) N t1=False False t1
N= int(input())
c=list(str(input()))
#N=4
#c=['W', 'W', 'R', 'R']
#c.reverse()
#print(c)

t1=t2=True

n1=0
n2=0
num=0
while t1:
    t2=True
    if not 0<=N-1-n1<=N-1:
        t1=False
    if c[N-1-n1]=='W':
        n1+=1
        continue
    else:
        while t2:
            if c[n2]=='W':
                if n2<N-1-n1:
                    c[N-1-n1]='W'
                    c[n2]='R'
                    num+=1
                    t2=False
                    continue
                else:
                    t1=False 
            n2+=1
            if not 0<=n2<=N-1:
                t1=False
                t2=False
print(num)  