n = int(input())
S = [c for c in input()]
ans = 0
i = 0
j = n-1
while i < j:
    if S[i] == "W":
        if S[j] == "R":
            S[i] = "R"
            S[j] = "W"
            j -= 1
            i += 1
            ans += 1
        else:
            j -= 1
    else:
        i += 1
print(ans) n = int(input()) n int(input()) int input() input c for c in input() for c in input() c input() input for c in input() c S = [c for c in input()] S [c for c in input()] ans = 0 ans 0 i = 0 i 0 j = n-1 j n-1 n 1 while i < j:
    if S[i] == "W":
        if S[j] == "R":
            S[i] = "R"
            S[j] = "W"
            j -= 1
            i += 1
            ans += 1
        else:
            j -= 1
    else:
        i += 1 i < j i j if S[i] == "W":
        if S[j] == "R":
            S[i] = "R"
            S[j] = "W"
            j -= 1
            i += 1
            ans += 1
        else:
            j -= 1
    else:
        i += 1 S[i] == "W" S[i] S i "W" if S[j] == "R":
            S[i] = "R"
            S[j] = "W"
            j -= 1
            i += 1
            ans += 1
        else:
            j -= 1
     S[j] == "R" S[j] S j "R" S[i] = "R" S[i] S i "R" S[j] = "W" S[j] S j "W" j -= 1 j 1 i += 1 i 1 ans += 1 ans 1 j -= 1 j 1 i += 1 i 1 print(ans) print ans i = 0 0 i i += 1 1 i i += 1 1 i n = int(input()) int(input()) n S = [c for c in input()] [c for c in input()] S j -= 1 1 j ans = 0 0 ans ans += 1 1 ans j = n-1 n-1 j j -= 1 1 j
n = int(input())
S = [c for c in input()]
ans = 0
i = 0
j = n-1
while i < j:
    if S[i] == "W":
        if S[j] == "R":
            S[i] = "R"
            S[j] = "W"
            j -= 1
            i += 1
            ans += 1
        else:
            j -= 1
    else:
        i += 1
print(ans)