n = int(input())
c = list(input())

r = c.count('R')  
wr = c[:r].count('W')  

print(wr) n = int(input()) n int(input()) int input() input c = list(input()) c list(input()) list input() input r = c.count('R') r c.count('R') c.count c count 'R' wr = c[:r].count('W') wr c[:r].count('W') [:r].count [:r] c :r r count 'W' print(wr) print wr c = list(input()) list(input()) c n = int(input()) int(input()) n r = c.count('R') c.count('R') r wr = c[:r].count('W') c[:r].count('W') wr
n = int(input())
c = list(input())

r = c.count('R')  
wr = c[:r].count('W')  

print(wr)