N = int(input())
C = input()

f = 0
b = N - 1
ans = 0

while True:
    while  f <= N -1 and C[f] == "R":
        f += 1
    while b >= 0 and C[b] == "W":
        b -= 1
    if f > b:
        print(ans)
        break
    ans += 1
    f += 1
    b -= 1 N = int(input()) N int(input()) int input() input C = input() C input() input f = 0 f 0 b = N - 1 b N - 1 N 1 ans = 0 ans 0 while True:
    while  f <= N -1 and C[f] == "R":
        f += 1
    while b >= 0 and C[b] == "W":
        b -= 1
    if f > b:
        print(ans)
        break
    ans += 1
    f += 1
    b -= 1 True while  f <= N -1 and C[f] == "R":
        f += 1
     f <= N -1 and C[f] == "R" f <= N -1 f N -1 N 1 C[f] == "R" C[f] C f "R" f += 1 f 1 while b >= 0 and C[b] == "W":
        b -= 1
     b >= 0 and C[b] == "W" b >= 0 b 0 C[b] == "W" C[b] C b "W" b -= 1 b 1 if f > b:
        print(ans)
        break
     f > b f b print(ans) print ans break ans += 1 ans 1 f += 1 f 1 b -= 1 b 1 f += 1 1 f b -= 1 1 b b -= 1 1 b ans = 0 0 ans N = int(input()) int(input()) N ans += 1 1 ans f += 1 1 f f = 0 0 f b = N - 1 N - 1 b C = input() input() C
N = int(input())
C = input()

f = 0
b = N - 1
ans = 0

while True:
    while  f <= N -1 and C[f] == "R":
        f += 1
    while b >= 0 and C[b] == "W":
        b -= 1
    if f > b:
        print(ans)
        break
    ans += 1
    f += 1
    b -= 1