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

r_n = 0
ans = 0
for c in C:
    if c == 'R':
        r_n += 1

for i in range(r_n):
    if C[i] == 'W':
        ans += 1

print(ans) N = int(input()) N int(input()) int input() input C = input() C input() input r_n = 0 r_n 0 ans = 0 ans 0 for c in C:
    if c == 'R':
        r_n += 1 c C if c == 'R':
        r_n += 1 c == 'R' c 'R' r_n += 1 r_n 1 for i in range(r_n):
    if C[i] == 'W':
        ans += 1 i range(r_n) range r_n if C[i] == 'W':
        ans += 1 C[i] == 'W' C[i] C i 'W' ans += 1 ans 1 print(ans) print ans N = int(input()) int(input()) N C = input() input() C r_n = 0 0 r_n ans = 0 0 ans ans += 1 1 ans r_n += 1 1 r_n
N = int(input())
C = input()

r_n = 0
ans = 0
for c in C:
    if c == 'R':
        r_n += 1

for i in range(r_n):
    if C[i] == 'W':
        ans += 1

print(ans)