N=int(input())
c=input()
R=c.count('R')
RR=c[0:R].count('R')
print(min(R-RR,R,N-R)) 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' RR=c[0:R].count('R') RR c[0:R].count('R') [0:R].count [0:R] c 0:R 0 R count 'R' print(min(R-RR,R,N-R)) print min(R-RR,R,N-R) min R-RR R RR R N-R N R N=int(input()) int(input()) N R=c.count('R') c.count('R') R RR=c[0:R].count('R') c[0:R].count('R') RR c=input() input() c
N=int(input())
c=input()
R=c.count('R')
RR=c[0:R].count('R')
print(min(R-RR,R,N-R))