from sys import stdin

from sys import setrecursionlimit

import bisect

setrecursionlimit(10 ** 7)



n = int(eval(input()))

c = eval(input())



count = c.count("R")

point = 0



for i,j in enumerate(c,1):

    if j == "R":

        if i > count:

            point += 1



print(point)
n = int(eval(input()))

s = eval(input())



num_r = s.count("R")

count = 0



for i in range(num_r):

    if s[i] != "R":

        count += 1

    

print(count)
from sys import stdin
from sys import setrecursionlimit
import bisect

setrecursionlimit(10**7)
n = int(eval(input()))
c = eval(input())
count = c.count("R")
point = 0
for i, j in enumerate(c, 1):
    if j == "R":
        if i > count:
            point += 1
print(point)

n = int(eval(input()))
s = eval(input())
num_r = s.count("R")
count = 0
for i in range(num_r):
    if s[i] != "R":
        count += 1
print(count)

-from sys import stdin -from sys import setrecursionlimit -import bisect - -setrecursionlimit(10**7) -c = eval(input()) -count = c.count("R") -point = 0 -for i, j in enumerate(c, 1): -    if j == "R": -        if i > count: -            point += 1 -print(point) +s = eval(input()) +num_r = s.count("R") +count = 0 +for i in range(num_r): +    if s[i] != "R": +        count += 1 +print(count)