#参考：https://marco-note.net/abc-174-work-log/
n = int(input())
c = input()

R=c.count('R')
cnt = 0

for i in range(R):
    if c[i]=="R":
        cnt += 1
print(R-cnt) n = int(input()) n int(input()) int input() input c = input() c input() input R=c.count('R') R c.count('R') c.count c count 'R' cnt = 0 cnt 0 for i in range(R):
    if c[i]=="R":
        cnt += 1 i range(R) range R if c[i]=="R":
        cnt += 1 c[i]=="R" c[i] c i "R" cnt += 1 cnt 1 print(R-cnt) print R-cnt R cnt cnt = 0 0 cnt c = input() input() c n = int(input()) int(input()) n R=c.count('R') c.count('R') R cnt += 1 1 cnt
#参考：https://marco-note.net/abc-174-work-log/
n = int(input())
c = input()

R=c.count('R')
cnt = 0

for i in range(R):
    if c[i]=="R":
        cnt += 1
print(R-cnt)
