n = int(input())
stones = input()
r = stones.count("R")
w = stones.count("W")
ans = stones[0:r].count("W")
print(ans) n = int(input()) n int(input()) int input() input stones = input() stones input() input r = stones.count("R") r stones.count("R") stones.count stones count "R" w = stones.count("W") w stones.count("W") stones.count stones count "W" ans = stones[0:r].count("W") ans stones[0:r].count("W") [0:r].count [0:r] stones 0:r 0 r count "W" print(ans) print ans ans = stones[0:r].count("W") stones[0:r].count("W") ans w = stones.count("W") stones.count("W") w n = int(input()) int(input()) n r = stones.count("R") stones.count("R") r stones = input() input() stones
n = int(input())
stones = input()
r = stones.count("R")
w = stones.count("W")
ans = stones[0:r].count("W")
print(ans)