N = int(input())
stone = input()
R = stone.count('R')
ans = stone.count('W', 0, R)
print(ans) N = int(input()) N int(input()) int input() input stone = input() stone input() input R = stone.count('R') R stone.count('R') stone.count stone count 'R' ans = stone.count('W', 0, R) ans stone.count('W', 0, R) stone.count stone count 'W' 0 R print(ans) print ans R = stone.count('R') stone.count('R') R ans = stone.count('W', 0, R) stone.count('W', 0, R) ans N = int(input()) int(input()) N stone = input() input() stone
N = int(input())
stone = input()
R = stone.count('R')
ans = stone.count('W', 0, R)
print(ans)