n = int(input())
s = input()
l = 0
r = n-1
ans = 0
while l < r:
    # print(l, r)
    if s[l] == 'W':
        if s[r] == 'W':
            r -= 1
        elif s[r] == 'R':
            r -= 1
            l += 1
            ans += 1
    elif s[l] == 'R':
        if s[r] == 'W':
            r -= 1
            l += 1
        elif s[r] == 'R':
            l += 1
print(ans) 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 ans = 0 ans 0 while l < r:
    # print(l, r)
    if s[l] == 'W':
        if s[r] == 'W':
            r -= 1
        elif s[r] == 'R':
            r -= 1
            l += 1
            ans += 1
    elif s[l] == 'R':
        if s[r] == 'W':
            r -= 1
            l += 1
        elif s[r] == 'R':
            l += 1 l < r l r if s[l] == 'W':
        if s[r] == 'W':
            r -= 1
        elif s[r] == 'R':
            r -= 1
            l += 1
            ans += 1
    elif s[l] == 'R':
        if s[r] == 'W':
            r -= 1
            l += 1
        elif s[r] == 'R':
            l += 1 s[l] == 'W' s[l] s l 'W' if s[r] == 'W':
            r -= 1
        elif s[r] == 'R':
            r -= 1
            l += 1
            ans += 1
     s[r] == 'W' s[r] s r 'W' r -= 1 r 1 elif s[r] == 'R':
            r -= 1
            l += 1
            ans += 1
     s[r] == 'R' s[r] s r 'R' r -= 1 r 1 l += 1 l 1 ans += 1 ans 1 elif s[l] == 'R':
        if s[r] == 'W':
            r -= 1
            l += 1
        elif s[r] == 'R':
            l += 1 s[l] == 'R' s[l] s l 'R' if s[r] == 'W':
            r -= 1
            l += 1
        elif s[r] == 'R':
            l += 1 s[r] == 'W' s[r] s r 'W' r -= 1 r 1 l += 1 l 1 elif s[r] == 'R':
            l += 1 s[r] == 'R' s[r] s r 'R' l += 1 l 1 print(ans) print ans l += 1 1 l r -= 1 1 r n = int(input()) int(input()) n r -= 1 1 r l = 0 0 l ans += 1 1 ans s = input() input() s r = n-1 n-1 r l += 1 1 l l += 1 1 l ans = 0 0 ans r -= 1 1 r
n = int(input())
s = input()
l = 0
r = n-1
ans = 0
while l < r:
    # print(l, r)
    if s[l] == 'W':
        if s[r] == 'W':
            r -= 1
        elif s[r] == 'R':
            r -= 1
            l += 1
            ans += 1
    elif s[l] == 'R':
        if s[r] == 'W':
            r -= 1
            l += 1
        elif s[r] == 'R':
            l += 1
print(ans)
