N = int(input())
c = input()
len_r = 0
len_w = 0
for i in range(N):
    if c[i] == 'R':
        len_r += 1
len_w = N - len_r
n_r = 0
for j in range(len_r):
    if c[j] == 'R':
        n_r += 1
ans = len_r - n_r
print(ans) N = int(input()) N int(input()) int input() input c = input() c input() input len_r = 0 len_r 0 len_w = 0 len_w 0 for i in range(N):
    if c[i] == 'R':
        len_r += 1 i range(N) range N if c[i] == 'R':
        len_r += 1 c[i] == 'R' c[i] c i 'R' len_r += 1 len_r 1 len_w = N - len_r len_w N - len_r N len_r n_r = 0 n_r 0 for j in range(len_r):
    if c[j] == 'R':
        n_r += 1 j range(len_r) range len_r if c[j] == 'R':
        n_r += 1 c[j] == 'R' c[j] c j 'R' n_r += 1 n_r 1 ans = len_r - n_r ans len_r - n_r len_r n_r print(ans) print ans n_r += 1 1 n_r len_w = 0 0 len_w N = int(input()) int(input()) N len_r += 1 1 len_r len_w = N - len_r N - len_r len_w c = input() input() c len_r = 0 0 len_r n_r = 0 0 n_r ans = len_r - n_r len_r - n_r ans
N = int(input())
c = input()
len_r = 0
len_w = 0
for i in range(N):
    if c[i] == 'R':
        len_r += 1
len_w = N - len_r
n_r = 0
for j in range(len_r):
    if c[j] == 'R':
        n_r += 1
ans = len_r - n_r
print(ans)