n = int(input())
stone = list(input())
l = 0
r = n-1
ans = 0
while l < r:
    if stone[l]=='W':
        if stone[r]=='R':
            ans += 1
            l += 1
            r -= 1
        else:
            r -= 1
    else:
        l += 1
        if stone[r]=='W':
            r -= 1
print(ans) n = int(input()) n int(input()) int input() input stone = list(input()) stone list(input()) list input() input l = 0 l 0 r = n-1 r n-1 n 1 ans = 0 ans 0 while l < r:
    if stone[l]=='W':
        if stone[r]=='R':
            ans += 1
            l += 1
            r -= 1
        else:
            r -= 1
    else:
        l += 1
        if stone[r]=='W':
            r -= 1 l < r l r if stone[l]=='W':
        if stone[r]=='R':
            ans += 1
            l += 1
            r -= 1
        else:
            r -= 1
    else:
        l += 1
        if stone[r]=='W':
            r -= 1 stone[l]=='W' stone[l] stone l 'W' if stone[r]=='R':
            ans += 1
            l += 1
            r -= 1
        else:
            r -= 1
     stone[r]=='R' stone[r] stone r 'R' ans += 1 ans 1 l += 1 l 1 r -= 1 r 1 r -= 1 r 1 l += 1 l 1 if stone[r]=='W':
            r -= 1 stone[r]=='W' stone[r] stone r 'W' r -= 1 r 1 print(ans) print ans l += 1 1 l ans += 1 1 ans l += 1 1 l r -= 1 1 r stone = list(input()) list(input()) stone n = int(input()) int(input()) n l = 0 0 l r -= 1 1 r r -= 1 1 r r = n-1 n-1 r ans = 0 0 ans
n = int(input())
stone = list(input())
l = 0
r = n-1
ans = 0
while l < r:
    if stone[l]=='W':
        if stone[r]=='R':
            ans += 1
            l += 1
            r -= 1
        else:
            r -= 1
    else:
        l += 1
        if stone[r]=='W':
            r -= 1
print(ans)