N = int(input())
c = input()

r_count = 0
for i in range(N):
    if c[i]=="R":
        r_count+=1

r_remain = 0
for i in range(r_count,N):
    if c[i]=="R":
        r_remain+=1

print(r_remain)
 N = int(input()) N int(input()) int input() input c = input() c input() input r_count = 0 r_count 0 for i in range(N):
    if c[i]=="R":
        r_count+=1 i range(N) range N if c[i]=="R":
        r_count+=1 c[i]=="R" c[i] c i "R" r_count+=1 r_count 1 r_remain = 0 r_remain 0 for i in range(r_count,N):
    if c[i]=="R":
        r_remain+=1 i range(r_count,N) range r_count N if c[i]=="R":
        r_remain+=1 c[i]=="R" c[i] c i "R" r_remain+=1 r_remain 1 print(r_remain) print r_remain r_remain = 0 0 r_remain c = input() input() c N = int(input()) int(input()) N r_count+=1 1 r_count r_remain+=1 1 r_remain r_count = 0 0 r_count
N = int(input())
c = input()

r_count = 0
for i in range(N):
    if c[i]=="R":
        r_count+=1

r_remain = 0
for i in range(r_count,N):
    if c[i]=="R":
        r_remain+=1

print(r_remain)

