n = int(input())
c = input()
 
r = c.count('R')
ans = c[0:r].count('W')
 
print(ans) 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' ans = c[0:r].count('W') ans c[0:r].count('W') [0:r].count [0:r] c 0:r 0 r count 'W' print(ans) print ans ans = c[0:r].count('W') c[0:r].count('W') ans r = c.count('R') c.count('R') r c = input() input() c n = int(input()) int(input()) n
n = int(input())
c = input()
 
r = c.count('R')
ans = c[0:r].count('W')
 
print(ans)