n = int(input())
s = input()
l = 0
r = n - 1
cnt = 0

while l<r:
    while s[l] == 'R' and l < r:
        l += 1
    while s[r] == 'W' and l < r:
        r -= 1
    if l>=r:
        break
    cnt += 1
    l += 1
    r -= 1

print(cnt) n = int(input()) n int(input()) int input() input s = input() s input() input l = 0 l 0 r = n - 1 r n - 1 n 1 cnt = 0 cnt 0 while l<r:
    while s[l] == 'R' and l < r:
        l += 1
    while s[r] == 'W' and l < r:
        r -= 1
    if l>=r:
        break
    cnt += 1
    l += 1
    r -= 1 l<r l r while s[l] == 'R' and l < r:
        l += 1
     s[l] == 'R' and l < r s[l] == 'R' s[l] s l 'R' l < r l r l += 1 l 1 while s[r] == 'W' and l < r:
        r -= 1
     s[r] == 'W' and l < r s[r] == 'W' s[r] s r 'W' l < r l r r -= 1 r 1 if l>=r:
        break
     l>=r l r break cnt += 1 cnt 1 l += 1 l 1 r -= 1 r 1 print(cnt) print cnt r -= 1 1 r cnt += 1 1 cnt l = 0 0 l l += 1 1 l l += 1 1 l n = int(input()) int(input()) n s = input() input() s r = n - 1 n - 1 r cnt = 0 0 cnt r -= 1 1 r
n = int(input())
s = input()
l = 0
r = n - 1
cnt = 0

while l<r:
    while s[l] == 'R' and l < r:
        l += 1
    while s[r] == 'W' and l < r:
        r -= 1
    if l>=r:
        break
    cnt += 1
    l += 1
    r -= 1

print(cnt)
