N = int(input())
C = input()

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

r = C.count('R')
ans = C[:r].count('W')
print(ans)