N = int(input())
C = input()
R = C.count("R")
ans = 0

for r in range(R):
  if C[r]=="W":
    ans+=1

print(ans)
0c1dbcf2f3af5a19c5a29c99d6b4ebadb6a86ab5
<mask token>

<mask token>
for r in range(R):
    if C[r] == 'W':
        ans += 1
print(ans)

N = int(input())
C = input()
R = C.count('R')
ans = 0
for r in range(R):
    if C[r] == 'W':
        ans += 1
print(ans)

N = int(input())
C = input()
R = C.count("R")
ans = 0

for r in range(R):
  if C[r]=="W":
    ans+=1

print(ans)