N = int(input())
#stones = list(input())
stones = input()
#print(stones)
a = stones.count('W')
b = stones.count('R')
 
left_side =stones.count('W', 0, b)
 
print(left_side) N = int(input()) N int(input()) int input() input stones = input() stones input() input a = stones.count('W') a stones.count('W') stones.count stones count 'W' b = stones.count('R') b stones.count('R') stones.count stones count 'R' left_side =stones.count('W', 0, b) left_side stones.count('W', 0, b) stones.count stones count 'W' 0 b print(left_side) print left_side a = stones.count('W') stones.count('W') a N = int(input()) int(input()) N left_side =stones.count('W', 0, b) stones.count('W', 0, b) left_side stones = input() input() stones b = stones.count('R') stones.count('R') b
N = int(input())
#stones = list(input())
stones = input()
#print(stones)
a = stones.count('W')
b = stones.count('R')
 
left_side =stones.count('W', 0, b)
 
print(left_side)