n = int(input())

c = list(input())
cnt = 0
l = 0
r = n-1
while l < r:
    while c[l] == "R" and l < r:
        l += 1

    while c[r] == "W" and l < r:
        r -= 1

    if c[l] == c[r]:
        break

    c[l], c[r] = c[r], c[l]

    l += 1
    r -= 1
    cnt += 1

print(cnt) n = int(input()) n int(input()) int input() input c = list(input()) c list(input()) list input() input cnt = 0 cnt 0 l = 0 l 0 r = n-1 r n-1 n 1 while l < r:
    while c[l] == "R" and l < r:
        l += 1

    while c[r] == "W" and l < r:
        r -= 1

    if c[l] == c[r]:
        break

    c[l], c[r] = c[r], c[l]

    l += 1
    r -= 1
    cnt += 1 l < r l r while c[l] == "R" and l < r:
        l += 1

     c[l] == "R" and l < r c[l] == "R" c[l] c l "R" l < r l r l += 1 l 1 while c[r] == "W" and l < r:
        r -= 1

     c[r] == "W" and l < r c[r] == "W" c[r] c r "W" l < r l r r -= 1 r 1 if c[l] == c[r]:
        break

     c[l] == c[r] c[l] c l c[r] c r break c[l], c[r] = c[r], c[l] c[l] c l c[r] c r c[r] c r c[l] c l l += 1 l 1 r -= 1 r 1 cnt += 1 cnt 1 print(cnt) print cnt n = int(input()) int(input()) n cnt = 0 0 cnt l += 1 1 l l = 0 0 l r -= 1 1 r l += 1 1 l r = n-1 n-1 r r -= 1 1 r c = list(input()) list(input()) c cnt += 1 1 cnt
n = int(input())

c = list(input())
cnt = 0
l = 0
r = n-1
while l < r:
    while c[l] == "R" and l < r:
        l += 1

    while c[r] == "W" and l < r:
        r -= 1

    if c[l] == c[r]:
        break

    c[l], c[r] = c[r], c[l]

    l += 1
    r -= 1
    cnt += 1

print(cnt)