n = int(input())
c = input()
r = 0
left, right = 0, n-1
while left < right:
    if c[left] == 'W' and c[right] == 'R':
        r += 1
        left += 1
        right -= 1
    if c[left]=='R':
        left += 1
    if c[right]=='W':
        right -= 1
print(r) n = int(input()) n int(input()) int input() input c = input() c input() input r = 0 r 0 left, right = 0, n-1 left 0 right n-1 n 1 while left < right:
    if c[left] == 'W' and c[right] == 'R':
        r += 1
        left += 1
        right -= 1
    if c[left]=='R':
        left += 1
    if c[right]=='W':
        right -= 1 left < right left right if c[left] == 'W' and c[right] == 'R':
        r += 1
        left += 1
        right -= 1
     c[left] == 'W' and c[right] == 'R' c[left] == 'W' c[left] c left 'W' c[right] == 'R' c[right] c right 'R' r += 1 r 1 left += 1 left 1 right -= 1 right 1 if c[left]=='R':
        left += 1
     c[left]=='R' c[left] c left 'R' left += 1 left 1 if c[right]=='W':
        right -= 1 c[right]=='W' c[right] c right 'W' right -= 1 right 1 print(r) print r r += 1 1 r left, right = 0, n-1 0 left r = 0 0 r right = 0, n-1 n-1 right n = int(input()) int(input()) n left += 1 1 left right -= 1 1 right right -= 1 1 right c = input() input() c left += 1 1 left
n = int(input())
c = input()
r = 0
left, right = 0, n-1
while left < right:
    if c[left] == 'W' and c[right] == 'R':
        r += 1
        left += 1
        right -= 1
    if c[left]=='R':
        left += 1
    if c[right]=='W':
        right -= 1
print(r)